Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Newlines: reading files that were created on other platforms

by adamk (Chaplain)
on Feb 02, 2005 at 06:50 UTC ( #427169=note: print w/ replies, xml ) Need Help??


in reply to Re: Newlines: reading files that were created on other platforms
in thread Newlines: reading files that were created on other platforms

You can't do this, it isn't enough.

In some situations, mostly ugly ones involving CVS, you can end up with mixed carriage returns in the file. Some Mac person edits 50 lines in the middle and the result is a mixed mess.

So there are cases where doing anything by doing the two part, "detect the first and then process assuming it stays the same" just won't be good enough.

You really do need to do some preprocessing to "localize" all of the newlines.


Comment on Re^2: Newlines: reading files that were created on other platforms

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2015-07-28 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls