in reply to Problem with running Perl script on Mac OSX
If there's a Windows-style line end on a file, Unix will often misinterpret the "shebang" line saying where to find the interpreter as /usr/bin/perl^M, and since there isn't a program called /usr/bin/perl^M it fails. By editing that line, you may have fixed the line ending, accidentally fixing the problem.
If that's the problem, tools like dos2unix can fix it, or something like:
perl -pi.bak -e 's/\r//g' your_script
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem with running Perl script on Mac OSX
by dracos (Sexton) on May 31, 2006 at 16:23 UTC |