http://www.perlmonks.org?node_id=538091


in reply to meta tag extraction with TokeParser

I think instead of this:
next if $token->[1] ne 'meta' && $token->[0] ne 'S';
you meant:
next if $token[0] ne 'S' || $token[1] ne 'meta';
Note the order of evaluation and the || instead of &&

But it might be even clearer if you say:

if ($token->[0] eq 'S' && $token->[1] eq 'meta' && $token->[2]{name}) +{ $meta{$token->[2]{name}} = $token->[2]{content}; }