in reply to Re: Help tightening up a subroutine please
in thread Help tightening up a subroutine please
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...)
|
|---|