Tom wrote:
> Well, I am a beginner as far as perl is concerned.
> Can some one point me that 'm doing is correct.
> I have pasted below my hash and array using Data:
umper()
>
> I am pushing Hash1, Hash2 in to an Array
No. The data you posted shows that you pushed two anonymous arrays
containing the flattened hashes into the array.
I assume you did:
push @Array, [%Hash1];
push @Array, [%Hash2];
Try to push *references* to Hash1 and Hash2 to the Array like so:
push @Array, \%Hash1;
push @Array, \%Hash2;
See perldoc perlreftut
Next time post real code.
And please have a look at the posting guidelines.
Thomas
--
$/=$,,$_=<DATA>,s,(.*),$1,see;__END__
s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~......>r~
$_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
'%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e. r^.>l^..>k^.-