in reply to Re: I need help with some logic.
in thread I need help with some logic.

The reason is that i need to parse out the html tags in the file and print them to browser. The way i am doing this is as follows: take in a line, see if there is a starting tag (like <body> or <html>) and send it to $start, check if there is an ending tag (like </table>, </html> etc.) and send that to $end and finally see if there is plain text and send that to $text. This works just peachy for the printing out just the html tags to the browser, but now i am left with several $text(s) and i don't know how to keep blocks of text together. Shaheeb

Replies are listed 'Best First'.
RE: RE: Re: I need help with some logic.
by Adam (Vicar) on Jul 11, 2000 at 22:29 UTC
    I didn't ask why you need to parse the html. I asked why you can't read the whole file. But I see what the issue is now, You are worried about font tags and line breaks breaking up your plain text. My advice is either forget all the breaks and join ' ', @lines or use a state machine to keep track of where you are as you parse.