2009/12/12 Philip Potter <philip.g.pot...@gmail.com>:
> 2009/12/12 Shawn H Corey <shawnhco...@gmail.com>:
>> Alan Haggai Alavi wrote:
>>> Hi,
>>>
>>> Windows requires you to use double quotes in place of single quotes. Saving 
>>> to
>>> a file and executing it is the only way that is cross-platform, I suppose.
>>
>> Doesn't Windows respond to here redirects?
>>
>> perl <<EOD
>>> print "Hello world\n";
>>> EOD

No, "here doc" is a *NIX convention, not Windows. The Windows
Powershell (which attempts to bring a lot of *NIX shell goodness to
Windows machines) does have a sort-of implementation of the here doc
concept: http://en.wikipedia.org/wiki/Here_document#Windows_PowerShell
but its using a different syntax and wouldn't work with your perl
one-liners. As a rule, perl one-liners are not portable across
platforms, and in some cases, even across shells.

-- 
Erez

"The government forgets that George Orwell's 1984 was a warning, and
not a blueprint"
http://www.nonviolent-conflict.org/ -- http://www.whyweprotest.org/

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to