Possible to detect hash with more than one key?

Posted by Sandra on Server Fault See other posts from Server Fault or by Sandra
Published on 2012-11-02T16:38:23Z Indexed on 2012/11/02 17:05 UTC
Read the original article Hit count: 148

Filed under:

I am collecting data in a hash of hashes which looks like

$VAR1 = {
          '502' => {
                     'user2' => '0'
                   },
          '501' => {
                     'git' => '0',
                     'fffff' => '755'
                   },
          '19197' => {
                       'user4' => '755'
                     }
        };

The problem is in 501. Two keys may not occur. Is it possible to detect this?

Update Fixed typo in hash.

© Server Fault or respective owner

Related posts about perl