David Cantrell sent the following bits through the ether:
> I have frequently wanted to overload operators when not using objects -
> for example, I wanted to overload == to tell me whether a list contained
> a certain scalar
% perldoc -q contains
How can I tell whether a list or array contains a certain
element?
Hearing the word "in" is an indication that you probably
should have used a hash, not a list or array, to store
your data. Hashes are designed to answer this question
quickly and efficiently. Arrays aren't.
...
Leon
--
Leon Brocard.............................http://www.astray.com/
Iterative Software...........http://www.iterative-software.com/
... Back Up My Hard Drive? I Can't Find The Reverse Switch!