use strict; my $url = 'http://www.google.com/finance/historical?q=NASDAQ:FFIV&output=csv'; my $file = 'data.csv'; use LWP::Simple; my $content = get($url); die "Couldn't get it!" unless defined $content; open my $fh, '>', $file or die "Can't open file $file: $!"; print $fh $content; close $fh;