Of course that really just uses grep for its side-effect, and you could just a little less twisted-brainedly say something like
foreach my $question ('a', 'm') { if ( sub { $_ eq $question and return 1 for @candidates; 0; }->() +) { print "Found $question\n"; } }
which is basically an inlined implementation of List::Util’s first.
Makeshifts last the longest.
In reply to Re^4: Too much SQL not enough perl
by Aristotle
in thread Too much SQL not enough perl
by jcpunk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |