I am now comparing so I grasp hashes and understand them more, in the first printed dump of HoH, there are 2 hashes called "hash1 and "name". hash1 has a key of name with values of uid,gid and gecos? uid,gid and gecos are accessed only through name, joe blow in this case? In the printed dump of HoHoH, there are 3 hashes called "hash2", "name" and "uid". hash2 has keys of name and uid with values of gid and gecos? gid and gecos are only accessible through hash uid? please provide any corrections in detail. thank you...HoH -------- 'jblow' => { 'uid' => '2195', 'gecos' => 'Joe Blow,,,', 'gid' => '20' }, snippet..... ( $name, $p, $uid, $gid, $gecos, $dir, $s ) = split( ':' ); $hash1{$name} -> {'uid'} = $uid; $hash1{$name} -> {'gid'} = $gid; $hash1{$name} -> {'gecos'} = $gecos; HoHoH ---------- $VAR1 = { 'jblow' => { '2195' => { 'gecos' => 'Joe Blow,,,', 'gid' => '20' } } }; snippet...... $hash2{$name}{$uid} = { gid => $gid, gecos => $gecos, };
In reply to Comparing HoH and HoHoH by mikejones
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |