Perl 5 cheat sheet v6 by Juerd Waalboer, http://juerd.nl/ . CONTEXTS SIGILS ARRAYS HASHES void $scalar @array %hash scalar @array @array[0, 2] @hash{'a', 'b'} list %hash $array[0] $hash{'a'} &sub *glob SCALAR VALUES number, string, reference, glob, undef REFERENCES \ references $$foo[1] aka $foo->[1] $@%&* dereference $$foo{bar} aka $foo->{bar} [] anon. arrayref ${$$foo[1]}[2] aka $foo->[1]->[2] {} anon. hashref ${$$foo[1]}[2] aka $foo->[1][2] \() list of refs NUMBERS vs STRINGS LINKS OPERATOR PRECEDENCE = = perl.plover.com -> + . search.cpan.org ++ -- == != eq ne cpan.org ** < > <= >= lt gt le ge pm.org ! ~ \ u+ u- <=> cmp tpj.com =~ !~ perldoc.com * / % x SYNTAX + - . for (LIST) { }, for (a;b;c) { } << >> while ( ) { }, until ( ) { } named uops if ( ) { } elsif ( ) { } else { } < > <= >= lt gt le ge unless ( ) { } elsif ( ) { } else { } == != <=> eq ne cmp for equals foreach (ALWAYS) & | ^ REGEX METACHARS REGEX MODIFIERS && ^ string begin /i case insensitive || $ string end (before \n) /m line based ^$ .. ... + one or more /s dot includes \n ?: * any amount /x ignore wh.space = += -= *= etc. ? zero or one /g global , => () capture list ops (?:) no capture REGEX CHARCLASSES not [] character class . == [^\n] and | alternation \s == [\x20\f\t\r\n] or xor {1,2} amount \w == [A-Za-z0-9_] \b word boundary \d == [0-9] \z string end \S, \W and \D negate ALWAYS use strict; NEVER unless pro LINKS use warnings; "$foo" perl.com my $var; $foo = "bar"; $$foo perlmonks.org open() or die $!; `$userinput` use.perl.org use Modules; /$userinput/ perl.apache.org This is my christmas gift for all Perl newbies out there :) Have fun! v1: initial version v2: fixed per merlyn's suggestions v3: added missing dollar signs v4: changed per TheDamian's suggestions v5: changed per TheDamian's suggestions Note: It's hard to maintain two copies, so if you want the most recent version, visit my homepage. Sorry! Update: If you have Perl 5.8.1 or later installed, try this on a command line: perldoc perlcheat # :)