Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Seemingly odd issue with push in foreach loops?

by einhverfr (Friar)
on Apr 24, 2015 at 06:44 UTC ( [id://1124492]=note: print w/replies, xml ) Need Help??


in reply to Seemingly odd issue with push in foreach loops?

btw you can replace your foreach loop with grep:

@test3 = grep { /md/ } @test;

or if you like to be verbose

@test3 = grep {$_ =~ /md/ } @test;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-25 08:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found