Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Searching Array To Hold RegEx Stack Is Order Dependant

by genehack (Beadle)
on Nov 21, 2008 at 20:36 UTC ( [id://725223]=note: print w/replies, xml ) Need Help??


in reply to Searching Array To Hold RegEx Stack Is Order Dependant

If I understand what you're asking, each field -- each thing you're searching for -- will only appear once in the input, right? If that's the case, you can iterate over your hash of regexps for each line, BUT after you find a match, delete that particular key from the hash. When your hash is empty, you're done searching. Alternatively, you could iterate over the hash of regexps, but only try the match if $summary->{$key} wasn't set.
  • Comment on Re: Searching Array To Hold RegEx Stack Is Order Dependant

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-25 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found