summaryrefslogtreecommitdiff
path: root/pod/perltrap.pod
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-12-21 11:58:53 +0000
committerNicholas Clark <nick@ccl4.org>2004-12-21 11:58:53 +0000
commit8886331dd4b839d5227a0a7455922ad41c74f30f (patch)
treefe74d163924e63aba8196621575e9cd6ec39063c /pod/perltrap.pod
parentc6ac9eb3861eefd893b4bd762866c9a4f6f7b6e1 (diff)
downloadperl-8886331dd4b839d5227a0a7455922ad41c74f30f.tar.gz
Note that the shell's test uses eq etc for numbers, = etc for
strings, the reverse of Perl, which is definitely a trap. Spotted by Alexei Alexandrov. p4raw-id: //depot/perl@23663
Diffstat (limited to 'pod/perltrap.pod')
-rw-r--r--pod/perltrap.pod7
1 files changed, 7 insertions, 0 deletions
diff --git a/pod/perltrap.pod b/pod/perltrap.pod
index d8f667c736..0ad0086a59 100644
--- a/pod/perltrap.pod
+++ b/pod/perltrap.pod
@@ -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