Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: An internet garbage filter

by hossman (Prior)
on Oct 27, 2003 at 07:04 UTC ( #302345=note: print w/ replies, xml ) Need Help??

in reply to An internet garbage filter

Haven't tried running it, but i would suggest converting your banned_sites hash into an array of regexes ... that way you don't have the seperate lists of fixed hosts in the hash, and host regexes in the is_banned_site method.

Comment on Re: An internet garbage filter
Replies are listed 'Best First'.
Re: Re: An internet garbage filter
by pg (Canon) on Oct 27, 2003 at 07:21 UTC

    For anyone use this program, my suggestion is to have a big hash for banned sites, but only a much smaller array for banned sites expressed with regexp.

    For example, if there are four sites you want to ban:


    It is better to put them all in the hash for fixed site, instead of using regexp, unless that site has a rich variety of names. If it only has three or four different names, put them in hash.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://302345]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2015-12-01 11:38 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (4 votes), past polls