in reply to Re^2: Maintainance of element order in hash
in thread Maintainance of element order in hash
I dont understand how to give nested hashes into it
#!/usr/bin/env perl # Hash order maintained use strict; use warnings; use Test::More tests => 1; use Tie::IxHash; tie my %foo, 'Tie::IxHash'; $foo{a} = [3, 2, 1]; $foo{b} = { s => 'senatus', p => 'populus', q => 'que', r => 'romanus' + }; is_deeply ([keys %foo], [qw/a b/], 'Order retained');
and see perldsc for how to use nested data structures generally.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Maintainance of element order in hash
by ravi45722 (Pilgrim) on Sep 30, 2016 at 02:44 UTC | |
by hippo (Archbishop) on Sep 30, 2016 at 08:33 UTC |