[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Thanks...I'll try that



Guess it helps to paste the code in before sending it, eh?

#!usr/bin/perl -w

 use strict;
 use LWP::Simple;
use URI::URL;

my $cap_server = new URI::URL 'http://chew80.che.wisc.edu/';

#one way is to use a variable for the server name(if you have a list of
servers to check)
#this checks if the server returns the head of an html page
  if (head($cap_server)) {
     print "$cap_server has responded....\n";
  }
#the other is to hardwire in the address and check the head
  if (head('http://chew80.che.wisc.edu/')) {
     print "chew80 server has responded....\n";
  }
#this code stores the downloaded page locally (for further checking?? or
whatever)
  getstore ($cap_server, "Dingo:chew80.html") or warn "couldn't save file
chew80...";



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org