The HTML::TokeParser::Simple documentation states that the ->is_start_tag method should be called on the token, not on the parser object:
if ( $token->is_start_tag( qr/^h[123456]$/ ) ) { ... }
So your code should be using $tkn where it uses $htm5.
In reply to Re: is_start_tag not on tokeparser simple
by Corion
in thread is_start_tag not on tokeparser simple
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |