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

Re^5: filtering an array

by philiprbrenan (Monk)
on Sep 01, 2012 at 22:59 UTC ( #991209=note: print w/ replies, xml ) Need Help??


in reply to Re^4: filtering an array
in thread filtering an array

You do not need the for becuase grep loops over the array you give it. Please change:

for (@positions) {@positions = grep $_->[1] =~ /ac/i, @positions;}

to:

@positions = grep $_->[1] =~ /ac/i, @positions;


Comment on Re^5: filtering an array
Select or Download Code
Re^6: filtering an array
by prbndr (Acolyte) on Sep 01, 2012 at 23:03 UTC
    right, but the error still persists. what here isn't defined?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-10-02 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (56 votes), past polls