perl 2.0 ('\\\\' eq "\\\\") bug?
Bob Best
bob at dhw68k.cts.com
Sat Jul 16 03:57:35 AEST 1988
The man page for perl 2.0 states (on page 6):
String literals are delimited by either single or double
quotes. They work much like shell quotes: double-quoted
string literals are subject to backslash and variable
substitution; single-quoted strings are not.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Perl considers '\\\\' identical to "\\\\" as evidenced by the following:
if ('\\\\' eq "\\\\") {print "equal\n";} else {print "not equal\n";};
Compare this with:
if ('\n\n' eq "\n\n") {print "equal\n";} else {print "not equal\n";};
--
Bob Best
uucp: ...{trwrb,hplabs}!felix!dhw68k!bob InterNet: bob at dhw68k.cts.com
More information about the Comp.sources.bugs
mailing list