in reply to Re^3: Maintainance of element order in hash
in thread Maintainance of element order in hash
Thanks for reply. I tried this by using your example. But when I dumping the hash it is not in the ordered as we inserted. Where I am missing the logic???
#!/usr/bin/env perl # Hash order maintained use strict; use warnings; use Test::More tests => 1; use Tie::IxHash; use Data::Dumper; tie my %foo, 'Tie::IxHash'; $foo{a}{c} = [3, 2, 1]; $foo{a}{b}{x} = { s => 'senatus', p => 'populus', q => 'que', r => 'ro +manus'}; $foo{a}{b}{y} = "ravi"; print Dumper \%foo;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Maintenance of element order in hash
by hippo (Archbishop) on Sep 30, 2016 at 08:33 UTC |