So maybe because $2 from my previous regex is undef, $tmp2 becomes undef resulting in the warning.. this makes sense.my $tmp2 = $2;
So to fix this would the 'best' solution to wrap my code in an if block:
if($tmp2){ if($tmp2 =~ m/'/){ ...
I thought 'in pattern match' literally meant within the m//
As for me escaping a single quote.. I get paranoid and end up escaping everything in my regex that is not an Alphanumeric just in case :-)
___ /\__\ "What is the world coming to?" \/__/ www.wolispace.com
In reply to Re: Re: Use of uninitialized value in pattern match (m//)
by wolis
in thread Use of uninitialized value in pattern match (m//)
by wolis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |