Why not just set scriptname.pl to executable(if not on Windows), and then pass the additional libs to load on the command line? The same applies to the include dirs.
For example, consider the following:
my @modules = split ",", $ARGV[0];
my @paths = split ":", $ARGV[1]; #change to ';' or other on Windows,
+ if needed
push(@INC, @paths);
$@ = undef;
map { eval("require $_;") unless $@ } @modules;
if($@) {
die "one or more modules failed: $@";
}
#rest of script
~Thomas~
"Excuse me for butting in, but I'm interrupt-driven..."