Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Confusing syntax error with grep

by ysth (Canon)
on Aug 12, 2004 at 18:48 UTC ( [id://382427]=note: print w/replies, xml ) Need Help??


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

    That comes pretty close yes :)

    Have Fun

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found