I faced with the similar issue some time back and came up with the following solution, which is working till now
Insert the following into the BEGIN {} blocks
BEGIN {
$ENV{'ORACLE_HOME'} = '/opt/oracle/OraHome1';
$ENV{'LD_LIBRARY_PATH'} = '/opt/oracle/OraHome1/lib';
}