No such thing as a small change | |
PerlMonks |
Re: $/ usageby ww (Archbishop) |
on Jan 02, 2013 at 21:38 UTC ( [id://1011356]=note: print w/replies, xml ) | Need Help?? |
I can think of only two reasons why you "can't do this from the commandline" - one is that the file name you're supplying does NOT exist or does not exist where you think it does -- is, in the directory from which you're executing your code. The other is that you're on a windows box and need to fix your quotes.
Works for me (the oneliner is as revised for use on the windows box most readily available): D:\>perl -E "undef $/; $text=<>; print $text; $/=\"\n\";" List.txtSource file as output by code above
Or, I suppose, a third possible cause of failure would amount to both the above. :)
In Section
Seekers of Perl Wisdom
|
|