wolis has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I have search PerlMonks and found questions and answers on all things Use of uninitialized value.. but none refer to pattern matching.
Now this warning logically makes sence, I have not initialise a variable in my regex.
then you look at the if regex it complained about:
if($tmp2 =~ m/\'/) { $tmp2 =~ s/\'/\\\'/g; # escape the single quotes.. }
How can I initialise the single quote? Should I be definding a var and using that in my regex? is this important?
Thanks,
___ /\__\ "What is the world coming to?" \/__/ www.wolispace.com
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Use of uninitialized value in pattern match (m//)
by Mr. Muskrat (Canon) on Feb 10, 2004 at 03:14 UTC | |
by mildside (Friar) on Feb 10, 2004 at 03:25 UTC | |
by wolis (Scribe) on Feb 10, 2004 at 03:37 UTC | |
by davido (Cardinal) on Feb 10, 2004 at 05:54 UTC | |
Re: Use of uninitialized value in pattern match (m//)
by Trimbach (Curate) on Feb 10, 2004 at 04:15 UTC | |
by liz (Monsignor) on Feb 10, 2004 at 09:49 UTC | |
by Anonymous Monk on Jun 26, 2009 at 11:59 UTC | |
by davorg (Chancellor) on Jun 26, 2009 at 12:15 UTC | |
by wolis (Scribe) on Feb 10, 2004 at 04:38 UTC |
Back to
Seekers of Perl Wisdom