@result_list = sort { my @tempA = split/ /,$a; my @tempB = split/ /,$b; $tempB[1] <=> $tempA[1] } @result_list;