Help for this page
my @array = ( {TYPE => "hole", SIZE => 126, STEP => "pcb", COMP => "none"}, ... {TYPE => "chain", SIZE => 96, STEP => "array", COMP => "right"}, {TYPE => "slot", SIZE => 130, STEP => "panel", COMP => "left"}, );
@sorted = sort {$a->{SIZE} <=> $b->{SIZE}} @array;
my @indices = sort {$hash{SIZE}[$a] <=> $hash{SIZE}[$b]} 0..$#{$hash{S +IZE}}; foreach my $key (keys %hash) { @{$hash{$key}} = @{$hash{$key}}[@indices]; # Slice }