I get the following error message: "Can't use string ("") as a HASH ref while "strict refs" in use at line 6" The problem goes away when I don't use strict. But I want to use strict.use strict; use HTML::TokeParser my $filepath = "c:/folder/file.html"; my $stream = HTML::TokeParser -> new($filepath); while (my $token = $stream -> get_token()){ print "PDF link!\n" if $token -> [2] -> {'href'} =~ m/\.pdf/; }
In reply to use strict and TokeParser by young_stu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |