in reply to Checking contents of fetched URL.

You can also use HTML::TreeBuilder to parse the HTML and use HTML::Element's dumping methods for pretty-printing:
my $tree = HTML::TreeBuilder->new; # empty tree $tree->parse( $res->content ); $tree->eof; # tells it to parse the whole thing # Straight content dump $tree->dump; # HTML-formatted print $tree->as_HTML; # Just the text print $tree->as_trimmed_text; # Cleanup the tree $tree->delete;