/ Published in: Perl
To check the existence of an element in a Perl array with specific properties, one tends to use `grep`. But this is inefficient because `grep` always checks each element. (Even in scalar context it returns the number of matching elements.) The following function aborts after the first find.