|Just another Perl shrine|
Filtering one array using another arrayby teabag (Pilgrim)
|on Sep 04, 2003 at 13:07 UTC||Need Help??|
teabag has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monks, lend me your ears...
I'm trying to write an urlgrabber and I thought it would be nice to include a sort of blacklisting system with it. Now the code for the grabbing/webscraping works perfectly. But I'm having problems with the blacklisting system.
I have 2 arrays. One (@sites) contains the grabbed urls, the other one (@blacklist) contains the blacklisted keywords. Now the code I came up with does "kinda" spot the blacklisted urls, but is clumsy, slow, inefficient and has to be filtered.
Could anyone point out an easier (and faster) way?
I'm sure there's more than one way, but /me just needs one anyway - Teabag