http://www.perlmonks.org?node_id=972315


in reply to use oracle home in script

You are setting Perl-variables, not environment variables. So as a quick remedy, you could set

$ENV{ORACLE_HOME}="/u01/app/oracle/product/10.2.0.4"; ...
and so on. See perlvar (%ENV).

Long term approach would be to start using DBI and DBD::Oracle. There are also some PM tutorials: Database Programming available.