This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Note that the shell's test uses eq etc for numbers, = etc for
authorNicholas Clark <nick@ccl4.org>
Tue, 21 Dec 2004 11:58:53 +0000 (11:58 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 21 Dec 2004 11:58:53 +0000 (11:58 +0000)
strings, the reverse of Perl, which is definitely a trap.
Spotted by Alexei Alexandrov.

p4raw-id: //depot/perl@23663

AUTHORS
pod/perltrap.pod

diff --git a/AUTHORS b/AUTHORS
index dd52926..8daf646 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -31,6 +31,7 @@ Alan Ferrency                 <alan@pair.com>
 Albert Chin-A-Young            <china@thewrittenword.com>
 Albert Dvornik                 <bert@genscan.com>
 Alessandro Forghieri           <alf@orion.it>
+Alexei Alexandrov              <alexei.alexandrov@gmail.com>
 Alex Gough                     <alex@rcon.rog>
 Alex Vandiver                  <alexmv@mit.edu>
 Alexander Gough                        <alex-p5p@earth.li>
index d8f667c..0ad0086 100644 (file)
@@ -267,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<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