sub find_img{ my @images; my $content = shift; my $p = HTML::TokeParser::Simple->new(string => $content); while (my $t = $p->get_token){ push @images, $t if $t->is_start_tag(q{img}); } return \@images; }