in reply to Display html in plaintext
Note that there are command-line tools that you may have available that will do pretty much what you want; no need to whip up a perl script when lynx will do:
lynx --dump <url>
This preserves some of the formatting, and labels the links as well. Lynx' table-savvy descendant, links, also takes --dump as an option, but the output is not as nice.
If not P, what? Q maybe?