in reply to UTFM - Use the Friendly Modules
use HTML::TreeBuilder; foreach (<*.html>) { my $tree = HTML::TreeBuilder->new_from_file($_); if ($tree->look_down('_tag', 'img', sub { !$_[0]->attr('alt') })) +{ print "$_ has a missing alt tag\n"; } $tree->delete; }
gav^
|
|---|