local $ENV{BLAH} = 42; libcall(); sub libcall { if( exists $ENV{BLAH} ) { print "env set to $ENV{BLAH}\n"; } else { print "env not set\n"; } }