Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Finding data in html file

by un-chomp (Scribe)
on Sep 21, 2007 at 21:21 UTC ( [id://640442]=note: print w/replies, xml ) Need Help??


in reply to Finding data in html file

One way to do it with HTML::TokeParser:
use HTML::TokeParser; my $doc = do { local $/; <DATA> }; my $p = HTML::TokeParser->new( \$doc ); while ( my $token = $p->get_tag("a") ) { my $url = $token->[1]{href}; my $text = $p->get_trimmed_text("/a"); print "Link is: $url\n"; print "Name is: $text\n\n"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-26 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found