X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperltrap.pod;h=0ad0086a599a4656411bb92932a706b1cb099045;hb=6168cf9995a8bfcfe4ab9350ebc7de70215ae9af;hp=6a6a4435684e09870e07a0a55eccfdc7270989ad;hpb=665e98b9987fe678dd115b56e9f0c9eb6bba0f1e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perltrap.pod b/pod/perltrap.pod index 6a6a443..0ad0086 100644 --- a/pod/perltrap.pod +++ b/pod/perltrap.pod @@ -18,6 +18,11 @@ Accustomed B users should take special note of the following: =item * +A Perl program executes only once, not once for each input line. You can +do an implicit loop with C<-n> or C<-p>. + +=item * + The English module, loaded via use English; @@ -174,7 +179,9 @@ Variables begin with "$", "@" or "%" in Perl. =item * -Comments begin with "#", not "/*". +Comments begin with "#", not "/*" or "//". Perl may interpret C/C++ +comments as division operators, unterminated regular expressions or +the defined-or operator. =item * @@ -206,6 +213,11 @@ Seasoned B programmers should take note of the following: =item * +A Perl program executes only once, not once for each input line. You can +do an implicit loop with C<-n> or C<-p>. + +=item * + Backreferences in substitutions use "$" rather than "\". =item * @@ -255,6 +267,13 @@ The arguments are available via @ARGV, not $1, $2, etc. The environment is not automatically made available as separate scalar variables. +=item * + +The shell's C uses "=", "!=", "<" etc for string comparisons and "-eq", +"-ne", "-lt" etc for numeric comparisons. This is the reverse of Perl, which +uses C, C, C for string comparisons, and C<==>, C C<< < >> etc +for numeric comparisons. + =back =head2 Perl Traps