Hola amigos: tengo este script:
#!/usr/bin/perl
use LWP::Simple;
my $URL= 'http://weather.uwyo.edu/cgi-bin/sounding?region=samer&TYPE=TEXT%3ALIST&YEAR=2008';
my $url = '&STNM=85442';
my $GRD2RAD = (3.141592654 / 180);
my $convertir = 0.514444;
for my $mes ( "12" ) {
for my $dia ( "01" .. "31" ) {
for my $hora ( 12 ) {
my $fecha = "$dia-$mes-$hora";
my $fichero = "$fecha.dat";
my $pagina = get("$URL&MONTH=$mes&FROM=$dia$hora&TO=$dia$hora$url");
if (defined $pagina) {
if ((my $datos) = $pagina =~ m/^<PRE>(.+?)<\/PRE>/sim) {
open (FICHERO, ">$fichero"); ...