My company recently gave us all laptops, and the first thing I did was install Linux, of course. It's Fedora 4, which I've used to a certain extent previously.
I'm currently working on porting changes to a very old version of Bugzilla (made by my predecessor) to the latest Bugzilla, and in attempting to duplicate what I have running at work, I copied over files to my laptop in the directory /var/www/html/bugs, and ran a simple Perl script I had created in the local directory called backup.
Nothing happened. By which, I mean, I immediately got back the command prompt.
I tried several things, and found that the script works fine when I call it with Perl:
But when I try to invoke the script directly:/usr/bin/perl ./backup
it fails to do anything, even though it's got the usual shebang line #!/usr/bin/perl -w at the top of the script../backup
I tried a simple Hello, world program with the same results; when run via:
it outputs:/usr/bin/perl ./hello.pl
as expected; when run directly ... nothing, nada, rien, nichts, niente. And I'm sure that it's pointing to the correct version of Perl, because which perl gives me: /usr/bin/perl.Hello world
I made the script owned by root (in case the original owner 'nobody' was the cause), I've tried moving the script to the root directory and running it there. I've even tried creating a wrapper to run it, and capture both the exit status and $!; the exit status is zero!
I'm sure it's something simple. And I'm gonna feel foolish when I find out what it is, I just know it. But, since I very much respect the accumulated knowledge at Perlmonks, I thought I'd ask here -- does anyone have a suggestion for what I should try next?
In reply to Invoking Perl on a script, vs. using shebang by liverpole
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |