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 );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to localize conditionally?
by saintmike (Vicar) on Mar 13, 2011 at 20:37 UTC |