Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: HTML::TokeParser not giving any tokens.

by karlgoethebier (Abbot)
on Dec 01, 2014 at 13:06 UTC ( #1108826=note: print w/replies, xml ) Need Help??

in reply to HTML::TokeParser not giving any tokens.

Try this:

if ( $response->is_success ) { my $tp = HTML::TokeParser->new( \$response->decoded_content ) || die "Can't open: $!"; while ( my $token = $tp->get_tag('img') ) { print $token->[1]->{'src'}, qq{\n}; } } else { print $response->decoded_content; die $response->status_line; } __END__ Starting...<br /><br /><br />Success! +ojs.php?id=39770&type=5 ../images/logo14.png ../images/ag.gif

Update: Added output. NB.: Saw solution above too late :-(

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^2: HTML::TokeParser not giving any tokens.
by rbhyland (Acolyte) on Dec 01, 2014 at 13:47 UTC

    Thanks! I'm using your solution. There's no substitute for understanding. I see now what I did wrong, which is the most important thing.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2022-01-17 02:17 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (50 votes). Check out past polls.