in reply to regexp solutions
Just use the ->text method of WWW::Mechanize:
use WWW::Mechanize; my $mech = WWW::Mechanize->new(); my $url = 'http://example.com'; $mech->get( $url ); print $mech->text; [download]