That works.

It became tweaked a little, $page = shift to be able to alter the result, and a
'/' b/c a top-level URL without file name and without trailing forward slash
gets redirected on the server to the version with the trailing forward slash.
A little quicker.  In detail, I think that http://www.someplace.com/~user would
first look for a file called ~user and then say, doh, that must be a directory,
and find the index or default page for http://www.someplace.com/~user/, and
then display the latter, with the trailing slash.  Ok, too much information.

Thank you very much!

Gary

#!perl

use HTML::Parser 3;
use LWP::Simple;

my $html = get("http://www.mit.edu/";) or die "Couldn't fetch the page";
my $parser = HTML::Parser->new(
                unbroken_text   => 1,
                ignore_elements => [qw( script head )],
                text_h          => [ sub { $page = shift; }, 'dtext']
        )->parse($html)->eof();
$page =~ s#\n\s*\n#\n#g;
print $page;

__END__
..


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to