BEGIN { #need this so you don't recurse indefinitely: if ( not exists $ENV{SYBASE_SET} ) { $ENV{SYBASE_SET} = 1; $ENV{SYBASE} = 'whatever'; # set the variable exec $0; # exec self with new env ## NOT_REACHED } }