in reply to Re^2: how to quickly tell if number is in an array
in thread how to quickly tell if number is in an array

whoops!
Okay... how about...
print "found\n" if grep(/^$number\$/, @array);

Replies are listed 'Best First'.
Re^4: how to quickly tell if number is in an array
by BUU (Prior) on Oct 12, 2005 at 02:41 UTC
    So now your using the regex engine.. to test if a number.. is exactly the same as another number?
      yes, this is a bit silly, isn't it.
      I just had a read of the faq on this one, and now I've realised that I need to go back and re-do a few of my utilty scripts...