Hi,
I'm trying to set a vaiable to = the name of a module I want to use as follows..
All I get when then trying to use the module is...
I've tried using
and eval with require not use.
Everything is giving me the same results.
What am I missing?
Thanks 1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
I'm trying to set a vaiable to = the name of a module I want to use as follows..
Code:
# Check for required module (windows / *nix)
if($DRIVER eq "ODBC"){
$MODULE="Win32::ODBC";
}
else{
$MODULE="DBI";
}
eval "use $MODULE";
All I get when then trying to use the module is...
Can't locate object method "new" via package "Win32::ODBC"
I've tried using
Code:
# Check for required module (windows / *nix)
if($DRIVER eq "ODBC"){
$MODULE="Win32/ODBC.pm";
}
else{
$MODULE="DBI.pm";
}
eval "use $MODULE";
and eval with require not use.
Everything is giving me the same results.
What am I missing?
Thanks 1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!