develooper Front page | perl.perl5.porters | Postings from May 2001

Re: Relocatable perl

Thread Previous | Thread Next
From:
Benjamin Sugars
Date:
May 3, 2001 11:11
Subject:
Re: Relocatable perl
Message ID:
Pine.LNX.4.21.0105031412460.805-100000@marmot.rim.canoe.ca
On Thu, 3 May 2001, Steve Fink wrote:

> Step #2 never fails, and deceives only if someone has messed with 
> argv[0]. Which is not uncommon and apparently already confuses perl:
> 
> % perl -e 'exec {"/bin/ls"} ("/usr/bin/perl", "-le", "print \$^X")'
> 
> Try `/usr/bin/perl --help' for more information.

Hmmm.  Does that not exec "/bin/ls" but with argv[0] set to
"/usr/bin/perl"?  IOW, the error message is coming from the ls program,
not perl.

> % perl -e 'exec {"glub"} ("/usr/bin/perl", "-le", "print \$^X")'
> (no output)

You obviously haven't installed the glub program on your system :-)

Cheers,
-Ben

-- 
signer: can't create ~/.sig: No CSI structure available


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About