laziness, impatience, and hubris | |
PerlMonks |
Re^3: Trouble grepping values when hash contains multiple values per keyby chromatic (Archbishop) |
on Jun 05, 2010 at 19:47 UTC ( [id://843288]=note: print w/replies, xml ) | Need Help?? |
Is there any way to force grep to evaluate these in a scalar context in order to return a "true" or "false" in this case? Yes, evaluate grep in scalar context. It's that easy! my $found_any = grep { ... } @whatever;Boolean context is also a scalar context.
In Section
Seekers of Perl Wisdom
|
|