tr -d '\r' < dosfile > unixfile removes all ^Ms, even if they are not at the end of the line where MSDOS seems to put them. tr(1) is small and fast.
perl -p -i.bak -e 's/\r$//;' dosfile renames the dosfile dosfile.bak and writes the corrected output in dosfile. The $ "anchors" the search pattern to the end of the line. Omit the "-i.bak" if you don't want to save the old file. Cameron http://www.rahul.net/cameron/homepage.shtml -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .