in reply to sorting and array by [2]
@sorted = sort { $a->[2] <=> $b->[2] } <INPUT>; chomp (@sorted); [download]