I have a simple redirector which is run by squid. What I want to do in the redirector is check the IP address of the client, and if it's a valid IP, allow it to pass through to the web server. If not, then block it. Can someone show me an example in perl of how to allow or deny a client in a perl redirector? FYI, I'm using the MaxMind GeoIP software which can determine what country an IP address originates from. But just knowing how to allow or deny an http request is what I'm after. Here's an example of what I have so far: #!/usr/bin/perl $|=1; while (<>) { open LOG, ">>/tmp/redir.log"; printf LOG "Got input: $_\n"; ##s@http://131\.215\.66\.103@http://www.xyz.com@; printf LOG "Output is: $_\n"; close LOG; }