Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Best way to remove elem of for loop

by hdb (Prior)
on Apr 24, 2014 at 14:41 UTC ( #1083615=note: print w/replies, xml ) Need Help??

in reply to Best way to remove elem of for loop

Have a look at grep:

@ar = grep { -d $_ } @ar;

Replies are listed 'Best First'.
Re^2: Best way to remove elem of for loop
by Preceptor (Deacon) on Apr 24, 2014 at 14:45 UTC

    Hmm, that's good. I had made the link between 'map' and 'grep' being similar, but it hadn't sunk in that you can apply an EXPR to grep, as well as a pattern.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1083615]
[ambrus]: Corion: ah, so you want a library that parses HTTP, and you want to do the IO yourself, and don't want a full AnyEvent wrapper.
[ambrus]: Corion: I think I parsed a HTTP header from a string with LWP once. You can definitely use that to create a HTTP message too. The problme is

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2016-12-07 15:57 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (130 votes). Check out past polls.