programming-examples/perl/Network/Using is_success() with getstore().pl

14 lines
284 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl -w
use LWP::Simple;
use strict;
my $status = getstore("http://www.demo.org/","/tmp/demo");
unless (is_success($status)) {
die "Couldn't retrieve page: $status";
}
open (PAGE, "/tmp/braingia") or die "$!";
while (<PAGE>) {
print();
}
close(PAGE);