in reply to Searching through a document and reporting results.
You should investigate some of the CPAN modules for manipulating HTML such as HTML::TreeBuilder or HTML::Parser to make parsing your file much easier.
If you are working with web pages then LWP and WWW::Mechanize are your friends.
Note that in scalar context an array returns its number of elements so you can simply write my $count = @sentences;.
|
|---|