Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Confusing syntax error with grep

by gumpu (Friar)
on Aug 12, 2004 at 18:38 UTC ( #382424=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://382424]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2022-12-03 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?