Mega Code Archive

 
Categories / Perl / Network
 

Using the mirror() Function

#!/usr/bin/perl -w use LWP::Simple; use strict; my $url = "http://www.demo.org/"; my $file = "/tmp/demo"; my $status = mirror($url,$file); die "Cannot retrieve $url" unless is_success($status);