<?xml version="1.0" encoding="windows-1252"?>
<node id="528928" title="merging two hashes" created="2006-02-08 15:48:18" updated="2006-02-08 10:48:18">
<type id="115">
perlquestion</type>
<author id="505944">
sen</author>
<data>
<field name="doctext">
&lt;p&gt;hell monks, 
&lt;p&gt;I need in my script, to merge the first element of each inner hash into array, but i didn't get the output what i need.
i need the output as @a=(a g h i g h i)
&lt;code&gt;
my $s = { 'aa' =&gt; {
                '1' =&gt; ['a'],
                '2' =&gt; ['b','c','d'],
                '3' =&gt; ['f'],
                '4' =&gt; ['g']
                },
        'bb' =&gt; {
                '1'  =&gt; ['g','h','i'],
                '2'  =&gt; ['s','a','d']
                },
        'cc' =&gt; {
               '1'  =&gt; ['g','h','i'],
               '2'  =&gt; ['s','a','d']
                }
           };
my @a= ($s-&gt;{aa}-&gt;{'1'},$s-&gt;{bb}-&gt;{'1'},$s-&gt;{cc}-&gt;{'1'});
print @a;
&lt;/code&gt;
&lt;p&gt; thanks in advance</field>
</data>
</node>
