sub increment { my $arg = shift if (is_bad($arg)) { die "FAILURE"; } return ++$arg; } my $num = 0; $num = increment($num); print "$num\n";