Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by dana (Monk)
on Apr 12, 2007 at 22:07 UTC ( #609767=note: print w/ replies, xml ) Need Help??


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

This may seem like a trivial thing to some but I always assume my input files are unix based therefore I fight this problem more often than I would like to admit.

I've converted files using unix tools and converted lines in a sloppy way that always got the job done but seemed like more of a hack than anything. I really needed something quick (starting to sound like the usual case for me? Re: Don't go all PerlMonks on me -- leaving for a long weekend (AGAIN), in less than an hour (AGAIN)).

This was so simply and worked with almost a simply cut/paste (I only changed the file handle). I was going to do sloppy programming (I was told to read documentation, but really wanted to test and troubleshoot if it threw an error) but this worked like a charm - clean and concise without the use of confusing regular expressions.

Thank you so very much.


Comment on Re^4: 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://609767]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2014-09-02 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (29 votes), past polls