# Log into the ftp # my $ftp; $ftp = Net::FTP->new("tgftp.nws.noaa.gov"); $ftp->login("anonymous", "anonymous") or die "login error"; $ftp->cwd("data/observations/metar/stations") or die "cwd failed"; $ftp->ascii; $ftp->get("$station_name.TXT", "../area/weather/$station_name.TXT") or die "failed to retrieve file $station_name.TXT"; $ftp->quit; # End ftp session # #### ./get_weather.pl EGLL failed to retrieve file EGLL.TXT at ./get_weather.pl line 31.