#!/bin/sh eval 'MYTESTVAR=/my/lib exec /usr/bin/perl -x -S $0 ${1+"$@"}' if $runningUnderSomeShell; #!perl print "[", $ENV{MYTESTVAR}, "]\n";