http://qs1969.pair.com?node_id=7624

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

In perl (using cgi), what is the code for a return?
I know it should be '\n', but when I take what's in a textarea box, and use
$variable =~ s/\n//eg;
it doesn't remove all of the returns.
Is something wrong with that little bit of code?
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
if ($variable eq "") { $variable = "Some Default Message"; }
If someone helps me, I'd appreciate it!