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 );
In reply to Re: How to localize conditionally?
by BrowserUk
in thread How to localize conditionally?
by saintmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |