Help for this page

Select Code to Download


  1. or download this
    #!perl -w
    
    ...
    my $command = get($site);
    die "An error has occured!" unless defined $command;
    print $command;
    
  2. or download this
        my $ua = LWP::UserAgent->new( keep_alive => 1 );
                                      timeout => 30 );
    
  3. or download this
        my $ua = LWP::UserAgent->new( keep_alive => 1,
                                      timeout => 30 );
    
  4. or download this
    unless ($response->is_success) {
            print  "Response status is: ", $response->status_line();
            return undef;
        }
    
  5. or download this
    print  "Response status is: ", $response->status_line() unless ($respo
    +nse->is_success);