#!/usr/bin/perl -w
use diagnostics;
use CGI::Carp qw(fatalsToBrowser);
use LWP::Simple;
@pages = qw(
page1 http://www.page1.com/
page2 http://www.page2.com/
);
@keepers = qw(b blockquote br i li ol p ul);
# proceed through the array of site 2 by 2
# using the name and URL
for($i=0;$i<$pagelength;$i+=2){
$html = ""; # initialise variable
$pagename = $pages[$i];
$pageurl = $pages[$i+1];
print "accessing $pagename at $pageurl...
\n";
#this is a bit cargo-cult, I got it from someone else's use of LWP:Simple
$doc=get($pageurl);
@html = $doc;
$html = join('',@html);
($pagetitle) = $html =~ /