Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Searching Array To Hold RegEx Stack Is Order Dependant

by genehack (Beadle)
on Nov 21, 2008 at 20:36 UTC ( #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
Node Status?
node history
Node Type: note [id://725223]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2020-10-22 04:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (225 votes). Check out past polls.

    Notices?