my $first_stuff = first_value {$_ > 2} 1..10; #### sub first_value (&@) { my $test = shift; local $_; foreach (@_) { return $_ if $test->(); } return undef; }