If you print like the code above, the name should print only once.foreach $newdn (sort keys %newgrouphash ) { print "Name:$newdn\n\t"; foreach $group ( sort @{$newgrouphash{$newdn}} ) { print "$group, "; } print "\n"; }
"By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest." -Confucius
In reply to Re: Hash of arrays
by NetWallah
in thread Hash of arrays
by perlloz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |