I've just flattened it into an array and sorted it.
output:my @flat_data; for my $file (keys %hoh){ for my $letter (keys %{$hoh{$file}}){ my $weight = $hoh{$file}{$letter}{weight}; my $intensity = $hoh{$file}{$letter}{intensity}; push @flat_data, "weight: $weight intensity $intensity Filename: $file"; } } print "$_\n" for sort @flat_data;
---------- Capture Output ---------- > "c:\perl\bin\perl.exe" _new.pl weight: 1000 intensity 4 Filename: FILENAME3 weight: 2000 intensity 7 Filename: FILENAME2 weight: 3000 intensity 2 Filename: FILENAME1 weight: 4000 intensity 3 Filename: FILENAME1 weight: 5000 intensity 3 Filename: FILENAME2 weight: 6000 intensity 3 Filename: FILENAME3 > Terminated with exit code 0.
In reply to Re: HoH problem
by wfsp
in thread HoH problem
by tamaguchi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |