young_stu has asked for the wisdom of the Perl Monks concerning the following question:
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/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use strict and TokeParser
by Joost (Canon) on Nov 23, 2004 at 23:52 UTC | |
|
Re: use strict and TokeParser
by dave_the_m (Monsignor) on Nov 23, 2004 at 23:50 UTC | |
|
Re: use strict and TokeParser
by Ovid (Cardinal) on Nov 24, 2004 at 03:02 UTC | |
by PodMaster (Abbot) on Nov 24, 2004 at 08:04 UTC | |
by Ovid (Cardinal) on Nov 24, 2004 at 12:56 UTC | |
by PodMaster (Abbot) on Jun 02, 2005 at 12:22 UTC | |
by Ovid (Cardinal) on Jun 03, 2005 at 15:39 UTC | |
| |
by Ovid (Cardinal) on Nov 24, 2004 at 22:40 UTC |