Based on the far-from-specific-enough description, I am interpreting this as suitable for PDL's approx function, which would broadcast over each element of two inputs, and set in the output either 1 (close enough) or 0 (not that). E.g.:
use PDL;
$close_enough_all = approx(map PDL->topdl($_), $in1, $in2)->all;