note
Paladin
Perl can handle the DOS line endings just fine, but as you said, it's the shell that can't (it tries to find a program named <c>/usr/bin/perl^M</c> to pass the script to).
The cases you had where you didn't have issues with DOS line endings could have been that your #! line was something like: <c>#!/usr/bin/perl -w^M</c>, in which case the shell can find <c>/usr/bin/perl</c> and passes it the command line argument <c>-w^M</c> along with the script name, and perl can process those fine.
1125168
1125179