: I'm saving a textarea to a database which displays the information
: on a website. I want to substitute the /r or /n that the user enters
: into the textarea with so its displayed correctly on the webpage.
Note that if you replace \r and \n and someone posts it from a Windows box then you may well end up with double line breaks. Last time I did this I stripped out all \r's and s/\n/<br>/g'd it.
: This isn't working and it looks to be my syntax.
:
: $test = $form{"event"};
: $test ~= s/\r/<br>/g;
: $test ~= s/\n/<br>/g;
:
: As well, does substitution recognize /r or /n submitted in a
: textarea?
That should be =~, not ~=. Other than that, it should work but see what I said earlier.
Jonathan
###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");