Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 taking refuge in the Monastery: (11)
As of 2015-03-04 19:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (124 votes), past polls