There is Mail::CheckUser, a Perl module for validating email addresses.
There is even Business::CreditCard, a Perl module for validating credit card numbers.
If you are storing credit card numbers, you MUST assume that your server will be hacked. Otherwise you will have a real problem when this happens. Use PGP or something alike to make sure that even someone who has root access to your server can not read them. Use fcheck or tripwire on a regular basis. Upload them including their cofigurtion and database before, dowload the database afterwards. This way you will hopefully notice if someone else starts storing those credit card numbers.