# first arg: n # second arg: array(ref) of arrays. # return: list of nth elements. sub nth_elem { map $_->[$_[0]], @{$_[1]} }