[thelist] Formatting text fields
Adrian Fischer
adrian at logo-logic.com
Sun Feb 4 03:17:37 CST 2001
Hi Gang,
I searched the archives (Honest I did) but to no avail...
I need to format text area fields so that it looks like what the user typed
in when they preview and for later display when retrieved from a db.
I have this snippet of perl stuff but I must have left out some stuff when I
wrote it down because it dont do nut'n...
I assume it should be looking for 2 new lines and replacing them with a <P>
and with a <BR> for a single new line.
But nothing happens
$form{'PARA2'}=~s/\n\n/<P>/g;
$form{'PARA2'}=~s/\n/<BR>/g;
It should take the text in PARA2 and format it but...nothing changes...can
some good samaritan point me in the right direction
Thanks
Adrian Fischer
More information about the thelist
mailing list