programming-examples/perl/Network/Using the mirror() Function.pl
2019-11-15 12:59:38 +01:00

11 lines
207 B
Perl

#!/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);