[Israel.pm] perl -e weirdness

Offer Kaye offer.kaye at gmail.com
Thu Aug 12 06:21:01 PDT 2004


On Thu, 12 Aug 2004 14:37:57 +0300, Gaal Yahas wrote:
> 
> Oops, sent to soon. So the point of the above is that your double-e'er
> compiles to:
> 
>      print "Hello
>      World\n"
> 
> And perl honors the inline newline.

Amazing how hard one can slap one's forhead when obvious things are
pointed out to one... :-)
Thanks Gaal!

> 
> Eitan, try using backticks instead of forward ticks on Windows.
> Perversely, CMD.EXE prefers those as quote marks.
> 

Not according to "perldoc perlrun" - according to it:
           # MS-DOS, etc.
           perl -e "print \"Hello world\n\""

So my code should work under Windows as:
perl -e "print \"Hello" -e "World\n\""

I don't have Windows to test this, but I seem to remember that when
printing to STDOUT under Windows I never needed an explicit newline
anyway- it was always inserted (either by ActivePerl or by the Windows
Shell, I don't know which), so the whole "newline after Hello" issue
is moot in Windows anyway.
Eitan, can you confirm?

Regards,
-- 
Offer Kaye



More information about the Perl mailing list