perl Data::Dumper to extract key values
问题 I have some perl code which I've written to get weather data/alerts from NOAA. My code is pretty simple: use Weather::NOAA::Alert; use Data::Dumper; $alert = Weather::NOAA::Alert->new(['TXC301']); $events = $alert->get_events(); $alert->poll_events(); print Dumper($events); # @url = (keys %{$VAR1->{'TXC301'}}); # $url = $VAR1->{'TXC301'}; $url = $events->{'TXC301'}; print "URL is $url\n"; # $expires= $events->{'TXC301'}->{$url}->{'expires'}; $expires= $events->{'TXC301'}->{'http://alerts