Perl Monk, Perl Meditation | |
PerlMonks |
Re: How to compare Array values??by markkawika (Monk) |
on Jul 13, 2009 at 17:58 UTC ( [id://779692]=note: print w/replies, xml ) | Need Help?? |
Your code doesn't match what you say. Do you want to check to see if the first element of Array1 contains the literal string $Array2[0] ? Because that's what your code does. If, instead, you have a regex stored in $Array2[0], and you want to use that to attempt to match against the string stored in $Array1[0], you need to not quote the variable:
In Section
Seekers of Perl Wisdom
|
|