[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Execing perl?

From: Paul Jarc
Subject: Re: Execing perl?
Date: Wed, 11 Jul 2001 15:35:06 -0400
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

"Paul D. Smith" <address@hidden> writes:
> My entire goal is to invoke Perl when I don't know the path.  I have
> lots of different systems, with different OS's on them, and Perl is
> installed on different places on each of them.  I want to run the same
> script on all of them.

You don't care where perl is installed.  You care whether a single
path is *a* (not *the*) name of perl, on all systems.  So on each
system, create a /command directory, and put a symlink to perl there.
Then use #!/command/perl in your scripts.  (This won't help for
systems you don't control, but I don't know whether that matters.)
See also: <URL:http://cr.yp.to/slashpackage.html>
and: <URL:http://cr.yp.to/slashcommand.html>

> How frustrating!  Other interpreters all have straightforward ways of
> doing this.

Such as?  This problem doesn't depend on the interpreter; a script has
to have *some* absolute path in the #! line.  Using /bin/sh is still
using an absolute path of an interpreter.

> Perl is getting too fancy for its own britches,

I think it passed that point a good long while ago.  Sending mail to
root when invoked for setuid scripts comes to mind.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]