http://stackoverflow.com/questions/4669670/how-do-i-download-a-file-using-perl I'd use LWP::Simple for this.#!/usr/bin/perl use strict; use warnings; use LWP::Simple; my $url = 'http://marinetraffic2.aegean.gr/ais/getkml.aspx'; my $file = 'data.kml'; getstore($url, $file);