Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Matching Part of a String in a IF Statmentby murugu (Curate) |
on Dec 12, 2005 at 09:06 UTC ( [id://515970]=note: print w/replies, xml ) | Need Help?? |
Hi awohld,
Its not matching because, it's trying to match '$city' i.e $city doesn't get interpolated. Remove that \ before $city, then it will match. You should also add boundary condition \b to the expression so that the you can do exact string match. (i.e)substring matches can be avoided Regards,
In Section
Seekers of Perl Wisdom
|
|