in reply to Extracting ALT text from image links
Remember to check out the docs for more info on the module (specifically the start and end events will be needed to get img tags from *within* a tags).use strict; use HTML::PullParser; my $p = HTML::PullParser->new( file => shift @ARGV, start => 'tagname, @attr' ); while(my $t = $p->get_token()) { my($tagname, %attr) = @$t; print "alt text is $attr{alt}", $/ if exists $attr{alt}; }
_________
broquaint
|
|---|