in reply to HTML::Parser problem

HTML::Parser does not guarantee that you will get the whole text in a link in a single chunk. You could try to see if enabling $p->unbroken_text(1) will solve your problem.

The other (IMHO better) solution is to move the processing of the text from your text subroutine into your end subroutine.

(Incidentaly, I just noticed you forgot to set skip back to 1 in your end subroutine...

Replies are listed 'Best First'.
Re: Re: HTML::Parser problem
by Peamasii (Sexton) on Mar 29, 2004 at 09:02 UTC

    I appreciate your suggestion, especially since it fixes the problem ;-)

    Yes, the $p->unbroken_text(1) solves the problem... and I made a note about moving the processing. The "skip" is fine because each input file follows a hardcoded structure.

    As a matter of fact, after reading some snippets here, I re-wrote the code using HTML::TokeParser and it works perfectly and it's much simpler this way :-)