How can we know why things get printed twice? The code you showed does not even have a
print statement!
I am pushing a user name and an array of AD groups for that user name into a hash of arrays: Code: push (@{$newgrouphash{"$newdn"} },"$newgroup")
You are not pushing an array of AD groups into a HoA. You are pushing the stringified version of a scalar into your HoA. For a start, drop all the double quotes around your variables. They serve no purpose. Then check whether
$newgroup indeed contains a reference to your array of AD groups.
And finally show us the code you use to output this data.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
My blog:
Imperial Deltronics