in reply to Re^2: Confusing syntax error with grep
in thread Confusing syntax error with grep
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Confusing syntax error with grep
by gumpu (Friar) on Aug 12, 2004 at 19:45 UTC |
In Section
Seekers of Perl Wisdom