in reply to Re^3: Too much SQL not enough perl
in thread Too much SQL not enough perl
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Too much SQL not enough perl
by Roy Johnson (Monsignor) on Oct 10, 2005 at 14:58 UTC | |
by Aristotle (Chancellor) on Oct 10, 2005 at 15:24 UTC |