#!/usr/local/bin/perl use strict; use warnings; use HTML::TokeParser::Simple; # load your html into a string my $content = do{local $/;<DATA>}; my $p = HTML::TokeParser::Simple->new(\$content); while (my $t = $p->get_tag(q{input})){ my $name = $t->get_attr(q{name}); my ($token) = $name =~ /^org\.somescript\.html\.(.*)$/; print $token; # prints TOKEN } __DATA__ <!-- lots of html --> <input name="org.somescript.html.TOKEN" type="hidden" value="f152a40cd9234c57542ee5b0c057cb0b" /> <!-- lots more html -->
In reply to Re: Help Parsing lwp browser request content
by wfsp
in thread Help Parsing lwp browser request content
by mmittiga17
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |