in reply to Re^4: Modifying order of a hash
in thread Modifying order of a hash

Well, you changed your HoH to a HoAoHoAoH. Naturally you can't use the same code anymore that was used to change the HoH. That you got a strange error message is because to perl it looked as if you wanted to use Pseudo-Hashes. Pseudo-Hashes are arrays that can be accessed as hashes, all Pseudo-Hashes have a hash-reference as first element.

You could bring the program back to working order by changing $newhash{$fn->{COMP}}= $fn; to $newhash{$fn->[0]{COMP}}= $fn;. But that would drop any other values in the outermost array (not that there are any at the moment). The question is can you work with a HoAoHoAoH when you still have problems using a HoH ?

Replies are listed 'Best First'.
Re^6: Modifying order of a hash
by monaghan (Novice) on Sep 26, 2008 at 00:11 UTC
    True. This is getting messy so thats why I posted another message on this thread showing that I should keep the original hash and modify it rather than delete items. Any ideas? Much appreciated