Depends on what you mean by "get help" -- if you mean 'do it for you,' hire a programer. If you mean help fix your code, you'll have to show it to us, and not just say "it did not work."
But if you mean 'get help learning how to....' -- well, http://www.perlmonks.com/index.pl?node=Tutorials#Pattern-Matching-Regular-Expressions-and-Parsing is just awaiting your visit.
And in that same vein, I'm not clear what you $text looks like, coming out of the database, so can't even guess why the snippet you show does "not work."
However, another and better option might be to stick the text into the db with html markup...
<p>para 1</p> <p>Slightly more extensive para two:</p> <ol><li>with details</li> <li>with details</li> </ol> <p>Pare 3 loret ipsum etc....</p>
That:
para 1
Slightly more extensive para two:
- with details
- with details
Pare 3 loret ipsum etc....
combined with whatever escaping demanded by your code, should do the job.
BTW, re the first reply, above, <br /> is NOT para code as the node might seem to suggest. It's an entity which produces a single linebreak (like 0d, 0a in a windows file) but not a para break which puts in an extra linebreak so paras are separated by a line blank except for the newline.
In reply to Re^3: I need help with displaying newline or paragraph using perl on my website
by ww
in thread I need help with displaying newline or paragraph using perl on my website
by 5plit_func
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |