in reply to Re: premature end of script headers
in thread premature end of script headers

i checked the path again and it is  /usr/bin/perl . also, another script runs fine with the same path .

Replies are listed 'Best First'.
Re^3: premature end of script headers
by davido (Cardinal) on Oct 23, 2004 at 15:22 UTC

    Yes, the path to perl is /usr/bin/perl. But as someone else said, look at the first line of your script, where you tell the OS where to find perl! Let me line it up on a chart below:

    Path to Perl.....: /usr/bin/perl Your Shebang Line: #!/user/bin/perl What's wrong: ^ | | Get rid of that 'e' in the first line of your script.

    Thus, the path to perl is wrong in your shebang line. What you have in the shebang line of your script does not match where perl is located on your system. If it works executing it from the command line, it's probably because you're typing perl scriptname, so the shebang line's path to perl is circumvented.

    Note I keep using 'perl' instead of Perl, because we're talking about the path to perl, the executable program, not Perl, the broader language.


    Dave