> -----Original Message-----
> From: ERIC Lawson - x52010 [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 30, 2002 4:55 PM
> To: [EMAIL PROTECTED]
> Subject: match + regexp synonyms?
>
>
> Why don't the match operators and regexps in the following produce the
> same results?
>
> if ($editbl =~ /^\S+$/) { print AFILE "$editbl\n"; }
This checks for a string of one or more non-whitespace chars.
> if ($editbl !~ /^\s*$/) { print EFILE "$editbl\n"; }
This checks for a string not consisting of zero or more whitespace chars.
These are not same. Strings with both non-whitespace and whitespace chars
will return different values for the two tests.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]