in reply to Re^2: Confusing syntax error with grep
in thread Confusing syntax error with grep
Come to think of it:
foreach ( @alist ) { if ( condition( $_ ) ) { do_something( $_ ); } }
can be written as
foreach ( @alist ) { condition( $_ ) and do_something( $_ ) }
Which is as pretty as the map version. The point about worrying too much about memory still stands though.
Have Fun
In Section
Seekers of Perl Wisdom