Greetings fellow monks,

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:

/usr/bin/perl ./backup
But when I try to invoke the script directly:
./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.

I tried a simple Hello, world program with the same results; when run via:

/usr/bin/perl ./hello.pl
it outputs:
Hello world
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.

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?


@ARGV=split//,"/:L"; map{print substr crypt($_,ord pop),2,3}qw"PerlyouC READPIPE provides"

In reply to Invoking Perl on a script, vs. using shebang by liverpole

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.