CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: General Discussions: General Questions:
/usr/bin/perl^M: bad interpreter: No such file or directory


New User

Jun 20, 2011, 8:14 AM

Post #1 of 1 (11759 views)
/usr/bin/perl^M: bad interpreter: No such file or directory Can't Post

I'm sure that this has been covered many times but I still can't get an answer to why I'm getting this error. I know all about the UNIX/Windows CRLF problem but it's not that.

One of our interns keep getting the error even though he said it worked before. If I just run the script on his system (OS X 10.6.6) I get the error. If I copy it to my system (same as his) and run it I don't get an error.

Perl is where the script is looking on both systems. I even used vi to retype(it's small) the script in again to make sure there were no hidden characters.

I then read that putting "--" on the line would flag the end of the CLI option list to the script/executable.
#!/usr/bin/perl --

and that worked? Can anyone tell me where the script is picking up the "^M"?
None of this code has been developed on a Windows system.




Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives