Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: MVC Catalyst Architecture - City, State Zip locator

by Anonymous Monk
on Jul 22, 2008 at 16:33 UTC ( [id://699352] : note . print w/replies, xml ) Need Help??


in reply to Re^2: MVC Catalyst Architecture - City, State Zip locator
in thread MVC Catalyst Architecture - City, State Zip locator

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!