in reply to Hash Array Help

First of all, when you push a hash onto an array like that, you are creating an array of the hash contents so that each key and each value are one element of the array. Your %temphash is being assigned the value of the first key, hence the odd number message. See:
%foo = ( a => 1, b => 2, c => 3, ); push @bar, %foo; print $bar[0], "\n";
What you need to do is push a hash reference, i.e. push @bar, \%foo onto the array and then use that value:
for my $foo (@bar) { print keys (%$foo), "\n"; }