in reply to Re^2: How to test for a new line
in thread How to test for a new line
That's only working because whatever's in $myvar1 and "\n" both happen to evaluate to 0 in a numeric context. You really meant eq; see perldoc perlop.
Update: Now if what you really mean is "is it a blank line with nothing but whitespace" you probably want $myvar1 =~ /^\s*$/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to test for a new line
by BadMojo (Novice) on May 13, 2005 at 15:19 UTC |