First, grep goes over the whole list. If you only need to stop at the first successful match, don't use it. You can use List::Util::first instead.
For this particular application, a bandpass filter rather than a low pass filter, List::Util::first is no substitute for grep.
( Actually, first() isn't even a low pass filter as it returns a single value not a filtered list but...)
In reply to Re^2: Help tightening up a subroutine please
by BrowserUk
in thread Help tightening up a subroutine please
by mdunnbass
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |