The two obvious guesses are:

1. perl isn't located in /usr/bin . If it's in, say, /usr/local/bin (as it
sometimes was on older systems) or in /bin, the command-line invocation will
work because it searches your PATH, but the script one won't since it has
the wrong directory.

2. "#!/usr/bin/perl" isn't the first line of the file; perhaps there is a
blank line that precedes it.

These are only guesses; for better guesses, give us more hints, such as the
actual error message that occurs when you try to execute the file.

At 08:02 PM 3/22/00 -0800, Dan Browning wrote:
>I cannot execute perl scripts ala: "./dostuff.pl", even with the correct
>#!/usr/bin/perl, and 755 permissions.  I have to prepend "perl" in order to
>exec the script.  Any guesses on this one?


------------------------------------"Never tell me the odds!"---
Ray Olszewski                                        -- Han Solo
Palo Alto, CA                                    [EMAIL PROTECTED]        
----------------------------------------------------------------


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to