Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl 'bad interpreter' message

Status
Not open for further replies.

tplassman

Programmer
Feb 6, 2006
12
US
I downloaded a free perl File upload script to my Fedore core 2 Linux box.

The script doesn't work. When I run it from the command line I get a "bad interpreter: no such file or directory" message. Yet if I a create a very simple perl script from scratch it works fine.

Any ideas on what might be wrong with the downloaded script or ideas on how I might get more detailed debug information would be welcome.

Thanks
Tom Plassman
 
bad interpreter: no such file or directory

The path to perl could be wrong in the downloaded script
Code:
which perl
from the command line should give you the right path to perl, and make sure that's reflected in the shebang line in your script
#!/usr/bin/perl <<shebang line

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Not so simple I'm afraid.

which perl

produces the same value as contained in the script.

Tom
 
check your line endings, if there's a windows newline at the end of your shebang, linux apache won't read the path correctly

- Andrew
Text::Highlight - A language-neutral syntax highlighting module in Perl
also on SourceForge including demo
 
That was it. On Solaris those bad characters stand out like a sore thumb but 'vi' on the linux box didn't show them.

Thanks
Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top