my $interactive = TRUE if ( ! system( 'tty -s' ) / 256 ); unless ($interactive) { unless ( $ENV{BEGIN_BLOCK} ) { $ENV{"ORACLE_HOME"} = '/opt/oracle/product/9.2.0'; $ENV{"LD_LIBRARY_PATH"} = '/opt/oracle/product/9.2.0/lib'; $ENV{BEGIN_BLOCK} = 1; exec 'env',$0,@ARGV; } }