NAME
    Scrape::USPS::ZipLookup - Standardize U.S. postal addresses.

SYNOPSIS
    Use the old interface based on Data::Address::Standardize module:

      use Scrape::USPS::ZipLookup;
      my $zlu = Scrape::USPS::ZipLookup->new();
      ($street, $city, $state, $zip) = $zlu->std_addr($street, $city, $state, $zip);

    or,

      use Scrape::USPS::ZipLookup;
      my $zlu = Scrape::USPS::ZipLookup->new();
      # Read in a pipe-delimited data set like a filter.
      while(<>) {
          chomp;
          my @addr = split('\|');
          push @addr_list, [ @addr ];
      }
      my @std_list = $zlu->std_addrs(@addr_list);
      # Write a pipe-delimited data set to standard output.
      foreach (@std_list) {
          print join('|', @$_), "\n";
      }

    Or, use the new interface:

      use Scrape::USPS::ZipLookup::Address;
      use Scrape::USPS::ZipLookup;

      my $addr = Scrape::USPS::ZipLookup::Address->new(
        'Firm'             => 'Focus Research, Inc.',
        'Urbanization'     => '',
        'Delivery Address' => '8080 Beckett Center Drive Suite 203',
        'City'             => 'West Chester',
        'State'            => 'OH',
        'ZIP Code'         => '45069-5001'
      );

      my $zlu = Scrape::USPS::ZipLookup->new();

      my @matches = $zlu->std_addr($addr);

      die "No matches!" unless @matches;

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-2003 Gregor N. Purdy. All rights reserved.

    This program is free software. It is subject to the same license as
    Perl.

