Uncaught exception in user code: #### sub weather{ no strict; my $weather = new Geo::Weather; my $zip_code= param('zip_code'); if($zip_code && $report){ $zip_code =~ s/\D//ig; $zip_code =~ s/\d{6,}//; if($report eq 'Temperature'){ my $current = $weather->get_weather($zip_code); print "The current temperature is $current->{temp} degrees\n"; }elsif ($report eq 'Full'){ $weather->get_weather('); print $weather->report(); }else{ print "Not valid"; # Just for security } }else{ print "Enter your zip code, please."; print start_form; print textfield(-name=>'zip_code',maxlength=>'5'); print "What kind of report do you want?"; print popup_menu({-name=>'report',-value=>['Temperature','Full'],-default=>'Temperature'}); print hidden('node','weather'); print submit(-value=>'Submit'); my $report = param('report'); } }