Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!elroy!devvax!lwall From: lwall@devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.sources.bugs Subject: Re: perl 2.0 ('\\\\' eq "\\\\") bug? Message-ID: <2478@devvax.JPL.NASA.GOV> Date: 18 Jul 88 18:46:25 GMT References: <9683@dhw68k.cts.com> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA. Lines: 21 In article <9683@dhw68k.cts.com> bob@dhw68k.cts.com (Bob Best) writes: : 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";}; OK, minor clarification. Single quoted strings DO pay attention to backslashes, but only in front of single quotes or backslashes. Sorry, I'll fix the doc. Larry