perlquestion
Anonymous Monk
In perl (using cgi), what is the code for a return?<br>
I know it should be '\n', but when I take what's in a textarea box, and use<br>
<code>$variable =~ s/\n//eg;</code><br>
it doesn't remove all of the returns.<br>
Is something wrong with that little bit of code?<br>
What I want to do Iis remove all of the carriage returns, so that if the user simply puts carriage returns in the textarea box, the variable will hold nothing, so that I could use<br>
<code>if ($variable eq "") { $variable = "Some Default Message"; }</code><br>
If someone helps me, I'd appreciate it!
1