Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Seeking HTML parsing examples

by pg (Canon)
on Dec 31, 2002 at 23:05 UTC ( #223495=note: print w/replies, xml ) Need Help??


in reply to Seeking HTML parsing examples

I am not sure whether you know about the Data::Dumper package. If you don't know, you really should learn it, and if you know, you should use it in this case.

I attached a piece of code to show you how to use Data::Dumper.

use HTML::TokeParser; use LWP::Simple; use Data::Dumper; use strict; my $url = $ARGV[0]; print Dumper(head($url)); my $html = get($url) || print "failed to get $url\n"; my $parser = new HTML::TokeParser(\$html); while (my $token = $parser->get_token()) { print Dumper($token); }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2020-10-20 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (209 votes). Check out past polls.

    Notices?