Welcome to the Monastery | |
PerlMonks |
Re: How to look for exact pattern matchby arhuman (Vicar) |
on Oct 30, 2001 at 16:04 UTC ( [id://122064]=note: print w/replies, xml ) | Need Help?? |
Is the following code what you're looking for ?
UPDATE : Ooops davorg said it faster... Furthermore if it's case-sensitive 'ne' is better than the regex used in my examples... UPDATE2 : Thanks Davorg for catching my error ! Only the last element of array will be taken out of the list, as the @tester array is completly reconstructed at each step of the loop (only ok with one element ;-) I've corrected the code with another solution... But you'd definitly better use davorg's one. "Only Bad Coders Code Badly In Perl" (OBC2BIP)
In Section
Seekers of Perl Wisdom
|
|