@array = [8,9,10], [4,5,6], [7,8,9]; # This is the array of arrays I need to sort # by second elements. # Magic step goes here.... # I need to end up with an array like @sorted: @sorted = [4,5,6], [7,8,9], [8,9,10];