#!/usr/bin/perl use strict; use warnings; my $url = "http://www.myurl.coml?data"; my $file = "file.txt"; # get the data use LWP::Simple; is_success(getstore($url, $file)) or die "cant get the data\n";