Of course it depends on what you know about your input data:
for most purposes s/[\r\n]+// will do the job as long as you can guarantee no \r or \n embedded in the lines. Monks might object that s/[\r\n]+$// is faster, being anchored, however reading a Windows file on a Mac there may be a possibility of splitting the \n onto the next line - I couldn't say.
in reply to Re: chomp() is confusing
in thread Why chomp() is not considering carriage-return