in reply to Filtering one array using another array
Put the blacklisted sites in a hash rather than a list, that way you can do a fast lookup. A bit cleaner would be to put them in a Set::Scalar, but this is a matter of taste. Since you need approximate matching, you could have a look at Tie::Hash::Approx.
If you'd like to get a list of URLs not in the blacklist, you could use a grep.
Hope this helps, -gjb-
Update: Oops, I should thoroughly read a post before replying, I didn't notice that a regex match was required. Thanks Abigail-II.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Filtering one array using another array
by Abigail-II (Bishop) on Sep 04, 2003 at 13:31 UTC |