Your datastructure is not an ideal fit. Instead, try a Hash of Arrays of Hashes:
Because each { foo => 'time' } anonymous hash is stored in a list, the order is preserved and Tie::IxHash is not needed.use strict; use warnings; use Data::Dumper; my %hash; push @{$hash{alice}}, {aaaa => "20:00:00"}; push @{$hash{john}}, {ccc => "21:00:00"}; push @{$hash{alice}}, {www => "22:00:00"}; push @{$hash{john}}, {aaa => "23:00:00"}; push @{$hash{andy}}, {xxx => "24:00:00"}; push @{$hash{alice}}, {bbb => "25:00:00"}; push @{$hash{andy}}, {yyy => "26:00:00"}; print Dumper $hash{alice}; __END__ $VAR1 = [ { 'aaaa' => '20:00:00' }, { 'www' => '22:00:00' }, { 'bbb' => '25:00:00' } ];
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: HoHoH Insertion Order
by jeffa
in thread HoHoH Insertion Order
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |