NAME

WWW::Scraper::ZIPplus4 - Get ZIP+4 code, given street address, from www.usps.com. Also helps de-duplicate a mailing list.

SYNOPSIS

Simple
use WWW::Scraper(qw(2.25));
use WWW::Scraper::Request::ZIPplus4;

my $ZIPplus4 = new WWW::Scraper(
        'ZIPplus4',
       ,{   'address1' => '1600 Pennsylvannia Ave'
           ,'city'     => 'Washington'
           ,'state'    => 'DC'
           ,'zipcode'  => '20500'
        } );

while ( my $response = $ZIPplus4->next_response() )
{    
    print $response->zipcode()."\n";
}
Complete
use WWW::Scraper(qw(2.25));
use WWW::Scraper::Request::ZIPplus4;

my $ZIPplus4 = new WWW::Scraper( 'ZIPplus4' );

my $request = new WWW::Scraper::Request::ZIPplus4;

# Note: Delivery_Address(), and either Zip_Code(), or City() and State(), are required.
$request->address1('1600 Pennsylvannia Ave');
$request->city('Washington');
$request->state('DC');
$request->zipcode('20500');

$ZIPplus4->scraperRequest($request);
while ( my $response = $ZIPplus4->next_response() )
{    
    for ( qw(address city state zipcode county carrierRoute checkDigit deliveryPoint) ) {
        print "$_: ".${$response->$_()}."\n";
    }
}

DESCRIPTION

This class is an ZIPplus4 specialization of WWW::Scraper. It handles making and interpreting ZIPplus4 searches http://www.ZIPplus4.com.

SPECIAL THANKS

To Klemens Schmid (klemens.schmid@gmx.de), for FormSniffer.

This tool is an excellent compliment to Scraper to almost instantly discover form and CGI parameters for configuring new Scraper modules. It instantly revealed what I was doing wrong in the new ZIPplus4 format one day (after hours of my own clumsy attempts). See FormSniffer at http://www.wap2web.de/formsniffer2.aspx (Win32 only).

AUTHOR and CURRENT VERSION

WWW::Scraper::ZIPplus4 is written and maintained by Glenn Wood, http://search.cpan.org/search?mode=author&query=GLENNWOOD.

COPYRIGHT

Copyright (c) 2001 Glenn Wood All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.