use lib
John Hundley
johnh at fgm.com
Fri Jun 15 13:39:08 CDT 2001
Hi,
Does anyone know how to send an array to use lib? Here is what I am trying
to do: I have a given directory tree containing perl packages but I don't
know where it will be installed. Also at the bottom of the tree there are
directories containing perl packages that may or may not be there at install
time. I will have an environment variable set called INSTALL_DIR that will
tell me where I am starting from. Forgive me I am just learning perl but
basically here is what I think the code should look like:
$INSTALL_DIR=$ENV{INSTALL_DIR};
@dirs = ("$INSTALL_DIR/install", "$INSTALL_DIR/install/sql",
"$INSTALL_DIR/install/sql/ORACLE", "$INSTALL_DIR/install/sql/SYBASE",
"$INSTALL_DIR/install/sql/INFORMIX");
@valid_dirs= [];
foreach $dir (@dirs){
if (-d $dir){
push @valid_dirs, $dir;
}
}
use lib @valid_dirs; #this is not working
I have tried every way I can think of to pass the array into lib and nothing
works. Any Ideas?
Thanks,
John Hundley
More information about the Pikes-peak-pm
mailing list