Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 pondering the Monastery: (9)
As of 2014-12-27 06:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls