in reply to Re: How to print Unix newlines in Strawberry Perl on Windows
in thread How to print Unix newlines in Strawberry Perl on Windows
$/ is the input record separator. The output record separator is $\. See The parable of the falling droplet.
Also, the default value of $\ is undef (meaning that nothing will be automatically appended to each printed line). If you set $\ as shown, you should omit the trailing "\n":
{ local $\ = "\r\n"; print "Win/DOS line ending"; }
— otherwise, you will get "\n\r\n" printed at the end of the string.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|