print Dumper(\%entries),"\n"; which produces 'kloesch' => { '291' => { 'gecos' => '', 'host' => '/home/dbsmith/passwd.spsdbp.hpux', 'gid' => '102' } }, 'sapdp4' => { '484' => { 'gecos' => '', 'host' => '/home/dbsmith/passwd.dudbdv02.aix', 'gid' => '208' } }, #### wlprdadm => uid #s, gid and gecos found on /home/dbsmith/passwd.eipdbmp1.hpux /home/dbsmith/passwd.carappp1.hpux but of course being uid, gid and gecos actual values. Finally, can a hash only contain keys like so: my %hash; my array= (a..d); $hash{$_}++ foreach @array;