Actually the perl man page recommends the following "devious construct" as
the most portable way to start your perl script:

eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
 & eval 'exec /usr/bin/perl -S $0 $argv:q'
     if 0;
#!here starts the perl code

I've used this on Linux, Solaris, and NT (with "perl filename"), all with
perl in odd locations, and it works fine.

Russ Selph - [EMAIL PROTECTED]
Architect, TIBCO Software Inc.
veni vidi gdb

On Fri, 19 Feb 1999, Heiko Nardmann wrote:

> Date: Fri, 19 Feb 1999 13:08:55 +0100
> From: Heiko Nardmann <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Re: snapshot 19990217 mini problem
> 
> Erwann ABALEA wrote:
> > 
> > On Thu, 18 Feb 1999, Heiko Nardmann wrote:
> > 
> > > In the 19990217 snapshot the Configure script has
> > > the path to perl hard coded to /usr/local/bin/perl.
> > > Since I have perl located at a different location
> > > this does not work. Maybe it the shell given in the
> > > first line should be set to /bin/sh and then exec perl
> > > with Configure as its argument better?
> > 
> > I think there's a script (util/perlpath.pl) that can help you rewrite the
> > first line of all the perl scripts, based on the real perl path, given as
> > an argument...
> > 
> 
> I suppose you misunderstood me. It is the Configure script which
> is run as the first thing after unpacking (as the alternative
> to "sh config") which has the perl path hard coded.
> 
> How about something like this:
> 
> #!/bin/sh
> exec perl -x $0
> #!here starts the perl code
> print "this is perl\n";
> exit(0);
>  
> -- 
> Ciao ... Heiko Nardmann (Dipl.-Ing.)
> Software Development, secunet (www.secunet.de)
> Security Networks GmbH, Weidenauer Str. 223-225, D-57076 Siegen
> Tel. : +49 271 48950-13                 Fax  : +49 271 48950-50
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
> 

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to