http://qs1969.pair.com?node_id=880721

hesco has asked for the wisdom of the Perl Monks concerning the following question:

Based on advise from Michel Rodriguez, author of XML::Twig, I am trying to employ ->findnodes() to parse from an html file a the content of each li tag. This is what I've got so far:

sub parse_mm_archive_cycle { my $self = shift; my $base_url = shift; my $cycle = shift; $cycle =~ s/:$//; my $url = "$base_url/$cycle/date.html"; print STDERR $url, "\n"; $self->{'agent'}->get( $url ); my $html = $self->{'agent'}->content(); $self->{'twig'}->parseurl($url,$self->{'agent'}); print STDERR 'Our twig objects is: ' . Dumper($self->{'twig'}); # $self->{'twig'}->parseurl($url); # my $root = $self->{'twig'}->root; for my $story ($self->{'twig'}->findnodes("li")){ print STDERR 'Next story: ' . Dumper($story); } return; # $html; }
But this keeps throwing an error on the ->parseurl line, reading:

syntax error at line 1, column 48, byte 48 at /usr/lib/perl5/XML/Parse +r.pm line 187 at lib/CF/mmFeedParser.pm line 113
Can anyone who has used this before please offer some advise?

if( $lal && $lol ) { $life++; }
if( $insurance->rationing() ) { $people->die(); }