my @sorted = sort { $a->[$the_col] <=> $b->[$the_col] } @two_dim;