Use the LWP::Simple module available from
CPAN, part of the excellent libwww-perl
(LWP) package. On the other hand, and if you have the lynx text-based
HTML browser installed on your system, this isn't too bad:
$html_code = `lynx -source $url`;
$text_data = `lynx -dump $url`;