in reply to how to escape new line in a string

Hi, You have substituted a new line character (\n) with nothing. Then why do you need to chomp? Chomp is set to the new line character by default.


Update________________________

It might be worth mentioning if the files are being transferred across from Windows to Linux. There is sometimes extra hidden characters in that situation.