in reply to Regular Expression Help!
The \s actually tests for any white-space character, including tabs and new-lines.if (defined $var or $var =~ /^\s+$/) { # $var is empty or contains only whitespace }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regular Expression Help!
by johngg (Canon) on Jul 02, 2010 at 21:21 UTC | |
|
Re^2: Regular Expression Help!
by Anonymous Monk on Jul 02, 2010 at 19:31 UTC | |
by Anonymous Monk on Jul 02, 2010 at 19:54 UTC | |
by marinersk (Priest) on Jul 02, 2010 at 21:14 UTC | |
by Anonymous Monk on Jul 06, 2010 at 13:30 UTC | |
by Anonymous Monk on Jul 02, 2010 at 19:52 UTC |