I'm trying to find tags in a html with a perl script.
use WWW::Mechanize::Firefox;
use Crypt::SSLeay;
use HTML::TokeParser;
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0;
my $mech = WWW::Mechanize::Firefox->new;
$mech->get_local('salida2.html');
my @links = $mech->links();
print @links;
my $parser = HTML::TokeParser->new('salida2.html') || die $!;
my $tag = $parser->get_tag('ul');
I get this error Can't call method "get_tag" on an undefined value at C:\Users\me\Documents\Scripts\parsing.pl line 9.
salida2.html is under the same directory than the script and I'm also using it with an WWW::Mechanize::Firefox instance and it's working fine.
Thank you in advance.