Try taking a look at chomp(). It may take care of what you are seeking.
In reply to Re: Remove Carriage Returns by atcroft in thread Remove Carriage Returns by lisaw