in reply to cgi security regex in subroutine

Listen to Ovid and read his tutorial, but also have a look on CPAN for modules that have solved this problem for you. Data::FormValidator comes to mind, but there are several others as well. If it is a common enough problem, then chances are someone else has come across it and solved it for you.

Cheers