laziness, impatience, and hubris | |
PerlMonks |
Re^3: Confusing syntax error with grepby ysth (Canon) |
on Aug 12, 2004 at 18:48 UTC ( [id://382427]=note: print w/replies, xml ) | Need Help?? |
Of course it would be even nicer if there was a construct in perl like: { do_something( $_) } forall ( @alist ) where { condition( $_ ) }You mean like: do_something( $_ ) for grep condition( $_ ), @alist; ? Update: condition( $_ ) and do_something( $_ ) for @alist; is going to be faster because it doesn't have to loop twice.
In Section
Seekers of Perl Wisdom
|
|