in reply to Return?
You may also think about using a different technique
than just testing for carriage returns; it sounds
like you'd like to use the default variable basically
if the user didn't post any "good text" in the text box.
So if they just posted whitespace (whether that be tabs,
spaces, or carriage returns), you'd like to use the
default variable.
In that case, use something like this:
This sets variable to the default unless it contains a non-whitespace character.$variable = "Some Default Messsage" unless $variable =~ /\S/;
|
---|
In Section
Seekers of Perl Wisdom