[Israel.pm] Pet Peeve

Peter Gordon peter at pg-consultants.com
Mon Jan 21 06:45:59 PST 2008

And since I started, I have another suggestion.

I normally work on Linux, and have to process files from from Other
Operating Systems (tm), where the line ending is \r\n.

Why can't chomp do what I want. Which is to say, delete either \r\n or
\n - whatever happens to be at the end of the line. I know I can use a
regex, but for something as simple as just removing line endings, one
would have thought there would be a nicer way to do it.


More information about the Perl mailing list