in reply to Re: better way to find list members?
in thread better way to find list members?
Here's a faster way to do that (looks neat too):foreach (@animals) { $animals{$_}++; } # initialize %animals hash
It's not exactly the same since it's setting each hash member to 1 instead of ++'ing it, but that's no big deal if you're just checking for an element's existance.@animals{@animals} = (1) x @animals;
-Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Re: better way to find list members?
by runrig (Abbot) on Oct 18, 2000 at 03:58 UTC | |
|
RE: RE: Re: better way to find list members?
by myocom (Deacon) on Oct 18, 2000 at 03:38 UTC |