programming-examples/perl/Network/Using the mirror() Function.pl

11 lines
207 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/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);