🐫

Perl Reference

A highly capable, feature-rich programming language with over 30 years of development. Essential syntax and code samples for professional development.

Variables

my $name = "Perl"; my @arr = (1..5); my %hash = ("id" => 1);

Regex

if ($text =~ /pattern/) { ... }

Loops

foreach my $i (@arr) { print "$i "; }

Subroutines

sub greet { my ($name) = @_; return "Hi $name"; }

File IO

open(my $fh, "<", "file.txt");

CPAN

use JSON; my $data = decode_json($str);