http://qs321.pair.com?node_id=148645

JamesA has asked for the wisdom of the Perl Monks concerning the following question:

I am writing a perl CGI to trap hack attempts on my web server. Right now I am implementing this with "ScriptAliasMatch" commands in httpd.conf but this method is getting unwieldy as the number of patterns are increasing.

I would like an error document CGI to run a loop reading regexes from a file and compare them to the requested URL until a match is found or all the regexes have been tested.

I have not found any samples yet that point me in the right direction to perform this 'reverse grep' type of function.