diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-06-05 22:05:20 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-06-06 01:00:22 -0700 |
commit | f6289783b6f4ac2a829a6f53eadf6ac16c6dde1a (patch) | |
tree | ec9962bba595312f7704a3ea6759580a4512df17 /pod/perltrap.pod | |
parent | 6a86c6ad94ba9f2a00d21db1a38c46b8c011f213 (diff) | |
download | perl-f6289783b6f4ac2a829a6f53eadf6ac16c6dde1a.tar.gz |
Alphabetize perltrap
Before 9b12f83b0b6, the programming languages other than Perl were in
alphabetical order.
Diffstat (limited to 'pod/perltrap.pod')
-rw-r--r-- | pod/perltrap.pod | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/pod/perltrap.pod b/pod/perltrap.pod index d55e77a6b0..1edb7f60f9 100644 --- a/pod/perltrap.pod +++ b/pod/perltrap.pod @@ -205,77 +205,6 @@ to find their names on your system. =back -=head2 Sed Traps - -Seasoned B<sed> programmers should take note of the following: - -=over 4 - -=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 * - -The pattern matching metacharacters "(", ")", and "|" do not have backslashes -in front. - -=item * - -The range operator is C<...>, rather than comma. - -=back - -=head2 Shell Traps - -Sharp shell programmers should take note of the following: - -=over 4 - -=item * - -The backtick operator does variable interpolation without regard to -the presence of single quotes in the command. - -=item * - -The backtick operator does no translation of the return value, unlike B<csh>. - -=item * - -Shells (especially B<csh>) do several levels of substitution on each -command line. Perl does substitution in only certain constructs -such as double quotes, backticks, angle brackets, and search patterns. - -=item * - -Shells interpret scripts a little bit at a time. Perl compiles the -entire program before executing it (except for C<BEGIN> blocks, which -execute at compile time). - -=item * - -The arguments are available via @ARGV, not $1, $2, etc. - -=item * - -The environment is not automatically made available as separate scalar -variables. - -=item * - -The shell's C<test> uses "=", "!=", "<" etc for string comparisons and "-eq", -"-ne", "-lt" etc for numeric comparisons. This is the reverse of Perl, which -uses C<eq>, C<ne>, C<lt> for string comparisons, and C<==>, C<!=> C<< < >> etc -for numeric comparisons. - -=back - =head2 JavaScript Traps Judicious JavaScript programmers should take note of the following: @@ -371,6 +300,77 @@ method's arguments, not as a separate C<this> value. =back +=head2 Sed Traps + +Seasoned B<sed> programmers should take note of the following: + +=over 4 + +=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 * + +The pattern matching metacharacters "(", ")", and "|" do not have backslashes +in front. + +=item * + +The range operator is C<...>, rather than comma. + +=back + +=head2 Shell Traps + +Sharp shell programmers should take note of the following: + +=over 4 + +=item * + +The backtick operator does variable interpolation without regard to +the presence of single quotes in the command. + +=item * + +The backtick operator does no translation of the return value, unlike B<csh>. + +=item * + +Shells (especially B<csh>) do several levels of substitution on each +command line. Perl does substitution in only certain constructs +such as double quotes, backticks, angle brackets, and search patterns. + +=item * + +Shells interpret scripts a little bit at a time. Perl compiles the +entire program before executing it (except for C<BEGIN> blocks, which +execute at compile time). + +=item * + +The arguments are available via @ARGV, not $1, $2, etc. + +=item * + +The environment is not automatically made available as separate scalar +variables. + +=item * + +The shell's C<test> uses "=", "!=", "<" etc for string comparisons and "-eq", +"-ne", "-lt" etc for numeric comparisons. This is the reverse of Perl, which +uses C<eq>, C<ne>, C<lt> for string comparisons, and C<==>, C<!=> C<< < >> etc +for numeric comparisons. + +=back + =head2 Perl Traps Practicing Perl Programmers should take note of the following: |