And just to make sure I wasn't omitting some important information, I ran the script command, and created the following blow-by-blow:
Script started on Sat 18 Feb 2006 11:37:23 PM EST [root@localhost html]# pwd /var/www/html [root@localhost html]# ls -ltd . drwxr-xr-x 3 root root 4096 Feb 18 23:15 . [root@localhost html]# ls -lt ./hello.pl -rwxr-xr-x 1 root root 39 Feb 18 23:14 ./hello.pl [root@localhost html]# cat ./hello.pl #!/usr/bin/perl -w print "Hello!\n"; [root@localhost html]# ./hello.pl Hello! [root@localhost html]# perl ./hello.pl Hello! [root@localhost html]# cd bugs [root@localhost bugs]# ls -ltd . drwxrwxrwx 14 root root 4096 Feb 18 23:14 . [root@localhost bugs]# ls -lt ./hello.pl -rwxrwxrwx 1 root root 39 Feb 18 23:14 ./hello.pl [root@localhost bugs]# cat ./hello.pl #!/usr/bin/perl -w print "Hello!\n"; [root@localhost bugs]# ./hello.pl [root@localhost bugs]# which perl /usr/bin/perl [root@localhost bugs]# /usr/bin/perl ./hello.pl Hello! [root@localhost bugs]# exit Script done on Sat 18 Feb 2006 11:38:53 PM EST
Note that it runs fine when I run it as root in /var/www/html, but then fails to print anything when, still as root, I run it in /var/www/html/bugs.  What the heck am I missing???

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

In reply to Re: Invoking Perl on a script, vs. using shebang by liverpole
in thread 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.