Using grep in boolean context is a common idiom for checking if any elements in a list match a condition.
This works because boolean context is a subset of scalar context,
and grep returns the number of matches in scalar context.
A non-zero number of matches means a match.

But consider the case of a long array where the first element is a match.
Boolean grep still checks all of the rest of the elements needlessly.
Instead,
a better solution is to use the any function from List::MoreUtils,
which short-circuits after the first successful match to save time.