I added the same lines but I am getting the below error "env:this is not a file or a directory" BEGIN { unless ($ENV{BEGIN_BLOCK}) { $ENV{ORACLE_HOME} = '/opt/instantclient_10_2/'; $ENV{LD_LIBRARY_PATH} = '/opt/instantclient_10_2/'; #$ENV{TNS_ADMIN} = '/common/oracle/env'; $ENV{BEGIN_BLOCK} = 1; exec 'env',$0,@ARGV; } }