Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Scrape::USPS::ZipLookup 2.6

    Download button

    No screenshots available
    Downloads: 112  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Gregor N. Purdy | More programs
    Perl Artistic License / FREE
    March 30th, 2012, 04:11 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Scrape::USPS::ZipLookup description

    Standardize U.S. postal addresses

    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.

    Scrape::USPS::ZipLookup is a Perl module that 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).

    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;



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    U.S. address | Perl module | postal address | Perl | U.S. | postal

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM