Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2015-11-28 12:38 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (741 votes), past polls