use Data::Dumper; my @array_items = ("dog" ,"desk" ,"cow"); my @array_items_weight = ("20" ,"10", "150"); # zip them together my @combined = map { [$array_items[$_], $array_items_weight[$_]] } 0 .. $#array_items; # sort the zipped array my @sorted = sort { $a->[0] cmp $b->[0] } @combined; # unzip again @array_items = map { $_->[0] } @sorted; @array_items_weight = map { $_->[1] } @sorted; print "\@array_items is now... "; print Dumper \@array_items; print "\@array_items_weight is now... "; print Dumper \@array_items_weight; #### my @combined = pairwise { [$a, $b] } @array_items, @array_items_weight;