in reply to Re: Re: Syntax Error
in thread Syntax Error

There are a couple of possibilities here.

1 -- The 'shebang line' ("#! /user ...") may have a leading space. The Shell, not finding '#!' as the first two characters takes off an tries to parse/run the "ksh" script it has just discovered.

2 -- The first line in the file is empty, so the Shell having no other guidance takes off and fails during the parse.

----
I Go Back to Sleep, Now.

OGB

Replies are listed 'Best First'.
Re: Syntax Error
by Abigail-II (Bishop) on Jan 20, 2004 at 16:46 UTC
    The handling of #! as the first two bytes of the file is a kernel issue. It's the kernel that looks at the first couple of bytes of an executable, and then decides how to run it. When issued properly, no shell will be involved. In fact, if the program gets fed to the shell, the first line will be ignored. # is, afterall, the start of a comment.

    Abigail

Re: Re: Re: Re: Syntax Error
by dragonchild (Archbishop) on Jan 20, 2004 at 16:34 UTC
    A third (unlikely) possibility is that Eudoro is executing the script on the commandline as follows
    $ ksh my_script.pl

    As I said, unlikely, but possible.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.