#!perl -w
use strict;
use LWP::Simple;
my $site = $ARGV[0] || "http://www.perlskripts.com";
my $command = get($site);
die "An error has occured!" unless defined $command;
print $command;
####
my $ua = LWP::UserAgent->new( keep_alive => 1 );
timeout => 30 );
####
my $ua = LWP::UserAgent->new( keep_alive => 1,
timeout => 30 );
####
unless ($response->is_success) {
print "Response status is: ", $response->status_line();
return undef;
}
####
print "Response status is: ", $response->status_line() unless ($response->is_success);