This should get you started.
#!/usr/bin/perl
use strict;
use warnings;
use autodie;
use LWP::Simple; #For getting a websites HTML also see LWP::UserAgent
use HTML::Tree; #Use a parser to parse HTML, read the docs on CPAN
#Use LWP get a page's contents
#We'll use the url to this question http://stackoverflow.com/questions/24858906/data-extraction-from-html-using-perl
my $url = "http://stackoverflow.com/questions/24858906/data-extraction-from-html-using-perl";
#All the html will be in content
my $content = get($url);
my $p = HTML::Tree->new();
#parse the string in $content. You can also parse_from_file or parse_from_url
#Though for learning sake you should get used to LWP
$p->parse($content);
#Check HTML::Element documentation for the data manipulation part
my $post = $p->find_by_attribute('class', 'post-text');
#Should print your question out.
print $post->as_text();
Now review the documentation for:
LWP::Simple
LWP::UserAgent
HTML::Tree
HTML::Element