in reply to Re^2: easy HTML::TokeParser help request
in thread easy HTML::TokeParser help request
If you're dead set on tokeing it, build a state machine:
Additional: Little note on implementation: you'd have a $state variable which keeps track of which state you're in (start with my $state = 'looking_for_full';). You'd then have a while( my $t = $stream->get_token ) { ... } loop, inside of which you'd implement the above behaviors. Any non-interesting token for the current state would be ignored (e.g. just next back to fetch the next token).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: easy HTML::TokeParser help request
by 2ge (Scribe) on Aug 03, 2006 at 14:21 UTC | |
by Fletch (Bishop) on Aug 03, 2006 at 14:42 UTC | |
by 2ge (Scribe) on Aug 04, 2006 at 12:20 UTC |