Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Confusing syntax error with grep

by gumpu (Friar)
on Aug 12, 2004 at 18:38 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-20 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found