in reply to Re: Parsers overwriting each other
in thread Parsers overwriting each other
I had assumed that declaring my tag_counter like that still meant that each instance had that. A quick google (now that I realise my problem) shows that the proper way to store my variables in the self hash reference. Sound like a better way of doing things? Time to test and see. Thanks heaps.use strict; use warnings; package MUCParser; use base "HTML::Parser"; my $num_of_tags; sub start { $tag_count+=1; } sub num_of_tags { return $tag_count; };
|
|---|