We don't bite newbies here... much | |
PerlMonks |
validate a postal codeby powerhouse (Friar) |
on Jul 03, 2008 at 17:43 UTC ( [id://695404]=perlquestion: print w/replies, xml ) | Need Help?? |
powerhouse has asked for the wisdom of the Perl Monks concerning the following question:
It amazes me how many people don't know their own address! We have nearly 30,000 members in our database and are growing every day. I need to validate their address because when we go to ship them their product, we get errors. For instance, I got and Address in Estonia where they put the country as United States. The Zip code they put as 74117, my only check for United States is the zip code, but 74117 is in a valid format. I have searched everywhere, including cpan for a module. My head is starting to hurt, I've spent hours on this and cannot find a good way to do it other than use LWP and just get a page off usps.com and then parse the HTML to find success or not... That could easily break by them just making a page change, so I need a different way to do it. I would greatly appreciate any place you can point me to that has a solution. We ship worldwide, except to Ghana and Nigeria... due to the amount of fraud we have received from there. So I really need a solution that is not limited to the United States. Thanks in advance for reading and for any pointers you have. Update: We use USPS for our mailing, but we did just setup an account with UPS, and I found a module (Net::UPS) that will integrate our UPS account with our site to validate the addresses...<br
thx, Richard
Back to
Seekers of Perl Wisdom
|
|