#!/usr/bin/perl -w
###########################################
# weather -- Get wether location
# Mike Schilli, 2006 (m@perlmeister.com)
###########################################
use strict;
use Weather::Com;

my $w = Weather::Com->new();

$ARGV[0] or die "usage: $0 city";

my $locs = $w->search($ARGV[0]);

for my $loc (keys %$locs) {
    printf "%-20s %s\n",
           $locs->{$loc}, $loc;
}
