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.