damian1301 has asked for the wisdom of the Perl Monks concerning the following question:
Nothing else, no helping error for me to find out what the problem is. Here is the subroutine.Uncaught exception in user code:
I have no idea what is wrong here so PLEASE help me. PS. I'm using CGI.pm and Geo::Weather. just FYI. Thanks in advance.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'); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Blank error problems..
by chromatic (Archbishop) on Jan 31, 2001 at 06:41 UTC | |
|
Re: Blank error problems..
by runrig (Abbot) on Jan 31, 2001 at 06:26 UTC | |
|
Re: Blank error problems..
by dws (Chancellor) on Jan 31, 2001 at 10:05 UTC |