in reply to perl wrapped in batch

Hi all. I have perl code wrapped in a batch file so that it can be run anywhere as long as the batch is in the environmental path. The only problem is that the code employs 2 package modules which it can't find when run from a separate directory. I have used 'perl -x -S' hoping that perl would 'cd' to the directory where the batch file resides and find the packages. This didn't work. I'm thinking i have to include both packages in the batch file as well. What are my options? thanks so much, michael

Maybe you should -I%path% as well? I.e. perl initing line of myscript.bat is

@perl -I%path% -x -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
Better would be to have a separate variable possibly set in the .bat file and then used in the start line as %path% is liable to be rather big.

You could also investigate having the -I switch on the

#! /path/perl
line

Dingus


Enter any 47-digit prime number to continue.