Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Problem sorting multidimentionnal hash on insertion order
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="A. Sinan Unur, post: 4808602"] $complex_hash{value} is a reference to just a regular hash table. #!/usr/bin/perl use strict; use warnings; use Tie::IxHash; my %complex_hash; tie %complex_hash, 'Tie::IxHash', (One => {}, Two => {}); for my $k (keys %complex_hash) { tie %{ $complex_hash{$k} }, 'Tie::IxHash'; $complex_hash{$k}->{A} = 1; $complex_hash{$k}->{B} = 2; } for my $k (keys %complex_hash) { print "$k\n"; for my $kk (keys %{ $complex_hash{$k} }) { print "\t$kk => $complex_hash{$k}->{$kk}\n"; } } __END__ Sinan [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Problem sorting multidimentionnal hash on insertion order
Top