Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Native newline encoding

by salva (Abbot)
on May 23, 2012 at 08:53 UTC ( #971988=note: print w/ replies, xml ) Need Help??


in reply to Re: Native newline encoding
in thread Native newline encoding

Interestingly, Encode::Newlines does it as follows:

use constant Native => ( ($^O =~ /^(?:MSWin|cygwin|dos|os2)/) ? CRLF : ($^O =~ /^MacOS/) ? CR : LF );

I guess that this, which some special handling for VMS where the line ending is set by file and EDBCDI systems where line endings are the lesser problem, should cover 99% of the cases.


Comment on Re^2: Native newline encoding
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://971988]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2015-05-03 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (76 votes), past polls