in reply to Finding a match between two paired arrays

The only thing "clunky" about it IMHO is the synthetic variable $found and even that's not so bad. You could the code it in a sub to isolate it a bit:

# note, assumes we're in a scope that knows about @a and @b sub check_a_b { my ($a,$b) = @_; for (0..$#a) { return 1 if $a eq $a[$_] && $b eq $b[$_]; } return 0; }

Or you could transmogrify the arrays to hashes but if you're updating the arrays throughout the code, you'll have to update the hashes too and that can be a bit of a pain.