in reply to How to localize conditionally?
Any reason why you can't pass the value into libcall() directly rather than via a localised %ENV element? (Which seems a strange way to do things?)
sub libcall { my $arg = shift; if( $arg ) { print "Arg is $arg\n"; } else { print "Arg undefined\n"; } } libcall( condition() ? 42 : undef );
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom