use PDL; $close_enough_all = approx(map PDL->topdl($_), $in1, $in2)->all;