in reply to Winning an Intranet competition with the aid of WWW::Mechanize
and not simply:my $text = $mech->content; my $tp = HTML::TokeParser->new(\$text); while (my $tag = $tp->get_tag('img')) { print "Found image: ", $tag->[1]{src}, "\n"; }
See, I would have won. Less typing. :)for ($mech->images) { print "Found image: ", $_->url_abs, "\n" }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|