I frequently write scripts that parse simple tab-delimited or comma-delimited files that have been created by other people. Typically they are created in Excel and they can be from windows or OS X platforms. I often run into the problem that a simple filehandle loop ( while(<FH>) ) will only read either the first or final line of the file. This is because the new line characters are not always \n as Perl likes- \r for OS X and \r\n for Windows. Preferably I would like to not have to bother working out what the problem is for each file and change the characters to \n using dos2unix or whatever, so I was wondering if anyone can suggest a good solution for this; is there a recommended module that has a method that performs this function?