NAME Scrape::USPS::ZipLookup - Standardize U.S. postal addresses. SYNOPSIS #!/usr/bin/perl use Scrape::USPS::ZipLookup::Address; use Scrape::USPS::ZipLookup; my $addr = Scrape::USPS::ZipLookup::Address->new( 'Focus Research, Inc.', # Firm '', # Urbanization '8080 Beckett Center Drive Suite 203', # Delivery Address 'West Chester', # City 'OH', # State '45069-5001' # ZIP Code ); my $zlu = Scrape::USPS::ZipLookup->new(); my @matches = $zlu->std_addr($addr); if (@matches) { printf "\n%d matches:\n", scalar(@matches); foreach my $match (@matches) { print "-" x 39, "\n"; print $match->to_string; print "\n"; } print "-" x 39, "\n"; } else { print "No matches!\n"; } exit 0; DESCRIPTION The United States Postal Service (USPS) has on its web site an HTML form at "http://www.usps.com/zip4/" for standardizing an address. Given a firm, urbanization, street address, city, state, and zip, it will put the address into standard form (provided the address is in their database) and display a page with the resulting address. This Perl module provides a programmatic interface to this service, so you can write a program to process your entire personal address book without having to manually type them all in to the form. Because the USPS could change or remove this functionality at any time, be prepared for the possibility that this code may fail to function. In fact, as of this version, there is no error checking in place, so if they do change things, this code will most likely fail in a noisy way. If you discover that the service has changed, please email the author your findings. If an error occurs in trying to standardize the address, then no array will be returned. Otherwise, a four-element array will be returned. To see debugging output, call "$zlu->verbose(1)". TERMS OF USE BE SURE TO READ AND FOLLOW THE UNITED STATES POSTAL SERVICE TERMS OF USE PAGE (AT "http://www.usps.com/homearea/docs/termsofuse.htm" AT THE TIME THIS TEXT WAS WRITTEN). IN PARTICULAR, NOTE THAT THEY DO NOT PERMIT THE USE OF THEIR WEB SITE'S FUNCTIONALITY FOR COMMERCIAL PURPOSES. DO NOT USE THIS CODE IN A WAY THAT VIOLATES THE TERMS OF USE. The author believes that the example usage given above does not violate these terms, but sole responsibility for conforming to the terms of use belongs to the user of this code, not the author. AUTHOR Gregor N. Purdy, "gregor@focusresearch.com". COPYRIGHT Copyright (C) 1999-2005 Gregor N. Purdy. All rights reserved. This program is free software. It is subject to the same license as Perl.