for ($mycount = 1; $mycount <=9; $mycount++) { my $te = new HTML::TableExtract ( depth => 1, count => $mycount ); # more stuff } #### reset_state() If you are using the same HTML::TableExtract object for multiple parses, call this between each parse to wipe the internal slate clean.