<H3>
tags:
use LWP::Simple; ($page = get 'http://www.cnn.com/') =~ s#^.*<H3>(.*)</H3>.*$#$1#s; print "$page\n";The s modifier of the substitution command was used because the period (.) in the regular expression needs to match newline, as well as all other characters. This will often be the case when a document is stored in a single scalar value.
Since it returns the entire content in a scalar, the get function
is suitable for only small web pages. To deal with larger pages, as well as to be
able to control headers, content types and other aspects of the HTTP protocol, the
LWP::UserAgent
and HTTP::Request
modules should be used.