From: "Paul G. Allen" <[EMAIL PROTECTED]>
It's been 4 years since I've written in Perl. I'm having a bit of trouble
with pattern matching.
I have a set of strings that are parsed from a file created by extracting
data from a database. Because some of the fields in the data are empty and
some are not, some strings are empty, some not. I want the code to process
all strings that aren't empty. All strings are NULL terminated.
So far I've managed to have the code either ignore all strings, or none of
them.
What's the correct pattern match for an empty string (the string is stored
in a scalar)?
Not a regex master here, but how about m/^$/
^ for the start of string, $ for end.
Gabe
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list