# Using @x and @y in this. sub check { my ($x, $y) = @_; return 0 unless $#$x == $#$y; for (0 .. $#$x) { return 0 if $x->[$_] ne $x->[$_] && $x->[$_] != $x->[$_]; } return 1; }