Ovid has asked for the wisdom of the Perl Monks concerning the following question:
I'm a relatively new to Linux, so I'm in over my head here. I'm having a problem with a shebang line and multiple versions of Perl.
One of our scripts runs fine from the command line but wouldn't run through the browser. We'd type
perl somescript.cgi
and everthing would run fine.
However, when we tried
./somescript.cgi
we would get a "No such file or directory" error. The shebang line was #!/usr/bin/perl and sure enough, there is a /usr/bin/perl out there.
After copying a shebang from another script, we discovered that it would run perfectly by enabling warnings (wtf???). Shebang:
#!/usr/bin/perl -wT
Take out the -w and the script won't run. /usr/bin/perl has perl 5.6.0. We discovered that we also have a /usr/local/bin/perl which is version 5.6.1 (which could be a red herring). I'm trying to figure out if there is some version conflict going on here, though I don't see how.
Anyone run across a problem like this before? We're running RedHat Linux version 7.0. Perl 5.6.1 was installed after the RedHat install.
Cheers,
Ovid
Vote for paco!
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|