sub libcall { my $arg = shift; if( $arg ) { print "Arg is $arg\n"; } else { print "Arg undefined\n"; } } libcall( condition() ? 42 : undef );