<?xml version="1.0" encoding="windows-1252"?>
<node id="1010659" title="Re^3: Hash of arrays" created="2012-12-28 02:32:29" updated="2012-12-28 02:32:29">
<type id="11">
note</type>
<author id="198160">
CountZero</author>
<data>
<field name="doctext">
How can we know why things get printed twice? The code you showed does not even have a &lt;c&gt;print&lt;/c&gt; statement!&lt;p&gt;&lt;blockquote&gt;&lt;em&gt;I am pushing a user name and an array of AD groups for that user name into a hash of arrays: Code: &lt;/em&gt;&lt;c&gt;push (@{$newgrouphash{"$newdn"} },"$newgroup")&lt;/c&gt;&lt;/blockquote&gt;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 &lt;c&gt;$newgroup&lt;/c&gt; indeed contains a reference to your array of AD groups.&lt;p&gt;And finally show us the code you use to output this data.&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-198160"&gt;
&lt;p&gt;CountZero&lt;/p&gt;&lt;p&gt;&lt;i&gt;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."&lt;/i&gt; - [http://www.canonical.org/~kragen/tao-of-programming.html|The Tao of Programming], 4.1 - Geoffrey James&lt;/p&gt;My blog: [http://imperialdeltronics.wordpress.com|Imperial Deltronics]
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1010633</field>
<field name="parent_node">
1010657</field>
</data>
</node>
