#!/usr/bin/perl
print "Content-type: text/html", "\n\n";

Name Spaces

$scalar or "${scalar}son"
@array[0] or ($element_of_list)
%associative_array{key_to_value}
&subroutine =refers to sub subroutine
LABEL (used w last, next, & redo loops)
FILEHANDLE & <SAME> (vs <glob_list> )
DIRECTORYHANDLE

Control Structures

if (this) { that; } else { thems; }
    that if this
    this && that
    this ? that : thems;
unless (this) { that; }
    that unless this
    this || that
while (this) { that; }
until (this) { that; }
for (init; test; increment) { that; }
foreach $i (@some_list) { that; }
last, next, & redo loops

Special Variables

$_ =default scalar
@_ =default array
_ =default filehandle
<> = @ARGV =list of command-line arguments
$& =matches reg expr
$` =text before match, $' =after match
@* =fieldholder for many lines in format
$: =word separator
$~ =default format of filehandle
$^I =invokes inplace editing
$| =0 for buffering output

Miscellaneous

chop($x = <STDIN>); #or chop(@x = <STDIN>);
open(FILE,"file") || die "nope";
printf "%#x", $y; #for these x's:
    s=rt just, g=gen, d=decimal, f=float


GeorgeHernandez.comSome rights reserved