Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Recreating hash

by kitkit201 (Initiate)
on Sep 12, 2012 at 23:50 UTC ( #993331=note: print w/ replies, xml ) Need Help??


in reply to Recreating hash

Thanks for the help guys! That made a lot of sense I am slowly learning syntax for perl. So now my question has evolved to.. I want to compare array hash strings. Specifically I want to do something like this, where i am comparing the $hash{alerts}[0]{status_history}{status} string to a string of them. (The english translation is, I want to compare that status_history,status strings of 1's. If there are at least 6 ones in the front of the arry, do stuff)

if ($hash{alerts}[0]{status_history}{status} =~ /1,1,1,1,1,1/) { do cool stuff }
Is that correct>?


Comment on Re: Recreating hash
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (13)
As of 2015-07-07 12:15 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 (88 votes), past polls