in reply to Checking a string's presence within an array.

Usually, I when I expect to need to check for the presence of something in an array, I code it with a hash from the start. Hard to beat O(1) efficency.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated

  • Comment on Re: Checking a string's presence within an array.