in reply to Re: Most efficient way of search elements in an array
in thread Most efficient way of search elements in an array

This does it alright ... except I just want one PASS to be printed if the script determines that all the array elements are 1
  • Comment on Re^2: Most efficient way of search elements in an array

Replies are listed 'Best First'.
Re^3: Most efficient way of search elements in an array
by toolic (Bishop) on Sep 15, 2009 at 15:23 UTC
    Then you want my 2nd example ("Update").

    Also note that my code is equivalent to the pre-5.10 solution offered by Fletch. It wasn't obvious to me from the documentation for List::MoreUtils, until I looked at the source code for any: it does break out of the loop as soon as it finds the first match.