Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 contemplating the Monastery: (8)
As of 2015-07-03 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls