There are some untainting modules on CPAN:
String::ShellQuote "contains some functions which are useful for quoting strings which are going to pass through the shell or a shell-like object."
CGI::Untaint "provides a simple, convenient, abstracted and extensible manner for validating and untainting the input from web forms." Including dates, email, urls, isbn, uk postal codes, and credit card numbers!
Check out my Perlmonks Related Scripts like framechat,
reputer, and xNN.