Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Searching through a document and reporting results.

by GrandFather (Saint)
on Jan 30, 2011 at 01:22 UTC ( [id://885086]=note: print w/replies, xml ) Need Help??


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;.

True laziness is hard work

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://885086]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2024-04-23 14:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found