http://www.perlmonks.org?node_id=727594


in reply to Re^2: Make my script faster and more efficient
in thread Make my script faster and more efficient

I've gotten gun-shy of chomp as well. In a mixed Unix/Windows environment, or running Cygwin, it's pretty common for $/ to not be set by default to the same line ending that is used in (some of) the input file(s). Monarch's method is more tolerant of incorrect or inconsistent line endings than chomp.