#! /bin/sh
#
# $Id: perlrun,v 1.4 2006/10/02 14:20:43 stewa Exp $

DIR="`dirname $0`"
if [ ! -f "$DIR/perlhelper" ] ; then
  DIR="`pwd`"
fi
if [ ! -f "$DIR/perlhelper" ] ; then
  echo >&2 "$0 $$: unable to find 'perlhelper' script"
  exit 1
fi
OLDIFS="$IFS"
IFS=":"
for X in $PATH
do
  IFS="$OLDIFS"
  if [ -f "$X/perl" ] ; then
     exec "$X/perl" "$DIR/perlhelper" "$@"
  fi
done
IFS="$OLDIFS"
echo >&2 "$0 $$: unable to locate Perl interpreter"
exit 1
