in reply to Re: How to remove a carriage return (\r\n)
in thread How to remove a carriage return (\r\n)

Chomp removes the line ending native to your platform.
Actually, chomp knows nothing about your platform. It removes $/ at the end of the string, as borisz has correctly indicated above.