Simple Perl module to sanitize and validate strings