Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: Quick and portable way to determine line-ending string?

by John M. Dlugosz (Monsignor)
on Aug 09, 2001 at 03:11 UTC ( [id://103279]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Quick and portable way to determine line-ending string?
in thread Quick and portable way to determine line-ending string?

I'm pretty sure it will have effect any time the underlying system's file IO is used, whether it's a real file or whatever.

As for slowing things down, does the line ending ever change? Figure it out once, and remember it. You could even make that part of installation.

Here is another idea. You can have a known file containing the line ending candidate and just read it. See which one was transformed into a simple "\n".

So, open (without binmode) lineend_mac and read it; ditto for lineend_pc and see which was a "\n". Neither really contained just a "\n".

—John

  • Comment on Re: Re: Re: Quick and portable way to determine line-ending string?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-24 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found