Problem solved! Here is what changed in the zips.pm
sub get_zip {
my ($self, $city, $state) = @_;
$cityy= s/\b(\w)(\w*)/uc($1).lc($2)/ge for $city;
#print "$city";
# return undef unless ($city && $state =~ /^(\d*)$/);
if (my $zip = $self->single({city_name => $city,state_abbr=>uc($st
+ate)},{columns => [qw/zip_code/]})) {
return $zip->get_column('zip_code');
}
return undef;
return $self->single({city_name=>$city,state_abbr=>uc($state)},{co
+lumns=>[qw/zip_code/]})->get_column('zip_code');
}
Thank you all for your help! |