Just another Perl shrine | |
PerlMonks |
Re: Pattern matching regex problemby Corion (Patriarch) |
on Nov 23, 2021 at 08:46 UTC ( [id://11139045]=note: print w/replies, xml ) | Need Help?? |
tr doesn't take character classes in square brackets ([]), so your code can also be written as:
Your code counts whether there is any of the letters I, O, S or M in the string. Which is obviously true. Maybe you wanted to match the letters in order?
In Section
Seekers of Perl Wisdom
|
|