in reply to Redefining chomp()

Why not pass your data files through dos2unix before letting them near your script?

or transfer them into the *nix world with ASCII mode ftp?