http://www.perlmonks.org?node_id=1010670


in reply to Re: Hash of arrays
in thread Hash of arrays

Sorry, new here, I used the print statements from the previous posters suggestions. The actual data being pushed into the HOA is a lot of code and is an AD query so it wouldn't compile. What I end up with is a key of Bob and an array containing groups: domain users, testing, server team etc
push (@{$newgrouphash{"$newdn"} },"$newgroup"); foreach $newdn (sort keys %newgrouphash ) { print "Name:$newdn\n\t"; foreach $group ( sort @{$newgrouphash{$newdn}} ) { + if (!($group =~ /CN=Domain Users/i)) { # print "$group, "; + $res = `dsmod group $group -rmmbr \"$newdn\"`; + print "$res\n";