my @tags = qw(a h1 h2 h3 h4 h5 h6 img link meta p title); my %hash = map {lc($_) => 0} @tags; my $tag_regexp = join ("|", @tags); while ($line =~ /<(($tag_regexp)([^>]+)?)>/ig){ my $regex = $1; if($regex =~/\s/){ my ($tag, $option) = split(/\s/, lc($regex),2); print "TAG : $tag / Option ($option)\n"; }else{ print "TAG : $regex / Option (Null)\n"; } }














