my %subhash = %{ $hash->{'Key1:Key1_si'} }; my @sorted_keys = sort { $subhash{$a}{keyc} <=> $subhash{$b}{keyc} } keys %subhash; for my $key (@sorted_keys) { print "Key1:Key1_si $key"; print ' ', $subhash{$key}{$_} for sort keys %{ $subhash{$key} }; print "\n"; }
In reply to Re: Perl - Sort a multi dimensional hash
by choroba
in thread Perl - Sort a multi dimensional hash
by krishnashah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |