In article <[EMAIL PROTECTED]> you wrote:
> On FreeBSD 2.2.6 I have encountered the interesting situation that
> Perl 4 and Perl 5 are both called "perl", and Perl 4 comes first in
> the search path. Here's a patch that reflects that problem (yes, it is
> an evil hack).
Then I suggest you to use my findperl script I wrote
a few years ago and which already survived practice:
##
## findperl -- Find a reasonable Perl interpreter
## Copyright (c) 1997-1999 Ralf S. Engelschall <[EMAIL PROTECTED]>
## Originally written for ePerl
##
TMPFILE=/tmp/findperl.sh.$$.tmp
rm -f $TMPFILE
touch $TMPFILE
c=0
for dir in `echo $PATH | sed -e 's/:/ /g'`; do
for perl in perl5 perl miniperl; do
if test -f "$dir/$perl"; then
perl="$dir/$perl"
version=`$perl -v | grep version |\
sed -e 's/.* version //' -e 's/ built.*//' -e 's/
with.*//'`
versionnum="`echo $version | sed -e 's/\.//g' -e 's/_//g'`"
versionnum=`expr $versionnum - $c`
echo "$versionnum $version $perl" >>$TMPFILE
fi
done
c=`expr $c + 1`
done
perlvers="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f2`"
perlprog="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f3`"
rm -f $TMPFILE
case $perlprog:$perlvers in
*:5* )
;;
*:* )
echo "Ops, BnP needs an installed Perl 5.00x somewhere in $PATH" 1>&2
exit 1
;;
esac
echo "$perlprog"
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]