sub print_if_true { my $value = shift; if ($value) { print "Value '$value' is true!\n"; } } print_if_true( 1 ); print_if_true( 0 );