http://qs1969.pair.com?node_id=202987


in reply to Re: Re: Re: shebang: automagically obtaining
in thread shebang: automagically obtaining

"But, if you could tell us why you need to do something like this, we might be able to offer an alternative solution."
No real reason - just would help when distributing scripts if people didn't have to worry about the shebang line.

The only reason I asked was because I thought I saw it done before.

Thanks anyway,
--nutshell

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: shebang: automagically obtaining
by BUU (Prior) on Oct 05, 2002 at 04:20 UTC
    I believe there is a bash hack to locate the perl interpreter and run it, is that what you are talking about?
Re: Re: Re: Re: Re: shebang: automagically obtaining
by jjdraco (Scribe) on Oct 05, 2002 at 04:20 UTC
    well, from the little that i know the only thing i could say is, if you want to run the script in win32 that you got from a *NIX system, then the shebang doesn't matter since you name the file with a .pl ext and windows uses that to determane that its a perl script. so you could keep the original shebang from the previous system unalterate and the script would still work.
    And for any other ideas, you'll have to ask some one else, I'm no expert.

    jjdraco
    learning Perl one statement at a time.
      If you're running the script as a CGI under Apache on Win32 the shebang is required by default.
        that I didn't not know, but I haven't tried writing any CGI scripts either. I had just seen some one ask a similar question on this site and that was the answer given.

        jjdraco
        learning Perl one statement at a time.