Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Help understand why this grep does not work

by LanX (Saint)
on Nov 02, 2013 at 15:42 UTC ( [id://1060945]=note: print w/replies, xml ) Need Help??


in reply to Help understand why this grep does not work

you are overwriting @results in each loop and are only getting the last hits.

edit

better try something like push @results, grep {/$match/} @data2;

Cheers Rolf

( addicted to the Perl Programming Language)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-03-29 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found