Exemple shell script to wrap PERL

The FAQchest faqchest at abac.com
Sat Nov 17 01:12:48 CST 2001


"Wilson, Doug" wrote:
> ~sdpm~
> > From: The FAQchest [mailto:faqchest at abac.com]
> >
> > During last night's meeting, Joel asked for a way to universally
> > determine the absolute path to PERL in order to create a generic PERL
> > script that would run as CGI on a large variety of systems, of course
> > with various PERL installations.
> >
> > Here is a sample script. Let us know if it works well on your
> > architecture.
> I'd change one thing, this line:
> perl_loc=`which perl | grep perl | sed -e 's,/perl,,'`
> wouldn't work for perls installed in /opt/perl5/bin, or
> for me either because I have perl installed in a really
> strange place that has '/perl' in the middle of the
> path, so I'd change that to:
> perl_loc=`which perl | grep perl | sed -e 's,/perl$,,'`

Actually you're totally right. Let's go for it.

Indeed, I've added /opt/perl5/bin for the HPUX implementations. I don't
have a SunOS system at hand right now. SunOS also uses a /opt partition.
Perl may be found here too.

> And on one system I've seen, 'which' was spelled 'whence' (don't
> ask me which one, I don't remember (and its rather uncommon
> anyway) :)

whence is also used in HPUX.

I have a vague souvenir of either one (type,which,whence) being in fact
an alias to one other with a switch.

I'll check on Monday.


> > PS: The new location for the meeting is awesome. Thanks!
> I agree :-)
> -Doug

The posting address is: san-diego-pm-list at hfb.pm.org

List requests should be sent to: majordomo at hfb.pm.org

If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at happyfunball.pm.org> with the following
command in the body of your email message:

    unsubscribe san-diego-pm-list

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at happyfunball.pm.org> .
This is the general rule for most mailing lists when you need
to contact a human.

More information about the San-Diego-pm mailing list