You shouldn't have \r anywhere in a text file on Linux or Unix. Try dos2unix or, failing that, use:
to get rid of stray carriage returns.perl -i~ -pe 'tr/\r//d; print' filename
In reply to Re^7: Perl Script in Windows Works, but not in Unix
by mr_mischief
in thread Perl Script in Windows Works, but not in Unix
by dobster936
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |