coldfingertips has asked for the wisdom of the Perl Monks concerning the following question:

Can someone give me a regex or something I can use to force a <br> as HTML after each set of paranthesis? I need it to look like:

JacobGrimm: Well, I only joined in May, so I know nothing of the "old site". (19 minutes ago)
JacobGrimm: Hmm. Kudos to the Mod who got rid of that comment. (21 minutes ago)

And what we have to mess with is just one big block of code (below is the actual print). I'm trying to get my @lines = split "<br>", $tree->as_HTML; to actually be able to break on the BR tags

Chat at Allpoetry.com Tired of the same old? Over 300 creative dates for $20 or less! click here! Hello. Login or Register? PoemsPoetsContestsColumnsClassAdd linesFunBulletinStoreHelp Chatter Archives< Previous Chatter | Next Chatter >JacobGrimm: Well, I only joined in May, so I know nothing of the "old site". (19 minutes ago) JacobGrimm: Or rather, however it came to disappear. Maybe of blAck-roSe-aL's own volition... (20 minutes ago) Redstormy: I'm am just frustrated because I thought this would be better than the old site. (20 minutes ago) Seven Years: lol (20 minutes ago) JacobGrimm: Hmm. Kudos to the Mod who got rid of that comment. (21 minutes ago) JacobGrimm: Red you can't blame the site. Servers aren't flawless. Sadly. (22 minutes ago) JacobGrimm: No problem. (23 minutes ago) Seven Years: I'm new... just today (23 minutes ago)

Replies are listed 'Best First'.
Re: force linebreak using HTML::Tree
by CombatSquirrel (Hermit) on Jul 30, 2003 at 16:10 UTC
    My idea would be to use a simple substitution statement: $html =~ s/)/)<br>/g. If you need something different or more elaborate, I'll be happy to help.