Just for the fun of it, I tried it under 5.6.0 on NT: D:\>perl -le "print '\\'" \ And under VMS: KES-JPEACOCK> perl -le "print '\\'" \ Hmmm, appears to be a Unix only thing. It is likely that the Unix shell is causing problems since there is no problem when running in the debugger: [root@vir named]# perl -lde 1 Default die handler restored. Loading DB routines from perl5db.pl version 1.07 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): 1 DB<1> print '\\' \ John Peacock "Casey R. Tweten" wrote: > > Today around 4:19pm, Ronald J Kimball hammered out this masterpiece: > > : On Thu, Nov 30, 2000 at 04:11:38PM -0500, WWW server user wrote: > : > A _very_ simple perl program: > : > > : > print '\'; > : > > : > causes > : > "Can't find string terminator "'" anywhere before EOF at blah line 1." > : > : That is the correct behavior. The backslash escapes the second quote, so > : you are missing the terminating quote. > : > : Perhaps you meant to escape the backslash? > : > : print '\\'; > > I expected this to work too but: > > [ctweten@ctweten ctweten]$ perl -le "print '\'" > Can't find string terminator "'" anywhere before EOF at -e line 1. > [ctweten@ctweten ctweten]$ perl -le "print '\\'" > Can't find string terminator "'" anywhere before EOF at -e line 1. > [ctweten@ctweten ctweten]$ perl -le "print '\\\'" > \ > [ctweten@ctweten ctweten]$ > > This is behavior in bleadperl, 5.6 and 5.5.3 I would consider: > > print '\\'; > > to be broken. > > -- > > print(join(' ', qw(Casey R. Tweten)));my $sig={mail=>'crt@kiski.net',site=> > 'http://home.kiski.net/~crt'};print "\n",'.'x(length($sig->{site})+6),"\n"; > print map{$_.': '.$sig->{$_}."\n"}sort{$sig->{$a}cmp$sig->{$b}}keys%{$sig}; > my $VERSION = '0.01'; #'patched' by Jerrad Pierce <belg4mit at MIT dot EDU>Thread Previous | Thread Next