How do I return nothing from a subroutine?
问题 I want to validate a condition before doing the next step, but only raise a warning and skip the current value instead of die-ing. How do I rewrite validate_me() subroutine without returning any value? (Update) please note that the following code works as expected, it just that I want something else instead of returning 1 or 0 from validate_me() that still allow the code to behave the same. foreach my $file ( @files ) { validate_me($foo, $bar, $baz) or next; do_something(); } sub validate_me