Read the error message.
perl -pi 's/\r\n/\n/' $a
is not the same as
perl -pi -e 's/\r\n/\n/' filename
In reply to Re: Remove ^M using script
by Corion
in thread Remove ^M using script
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |