Perl: the Markov chain saw | |
PerlMonks |
Re: Issue with regexby choroba (Cardinal) |
on Jun 23, 2017 at 15:50 UTC ( [id://1193379]=note: print w/replies, xml ) | Need Help?? |
eq is used for string equality. Use the binding operator =~ to bind a regular expression match against a variable:
BTW, as you can see, there's no need to add .* at the end, as the regex doesn't have to match the whole string. See perlop for details.
In Section
Seekers of Perl Wisdom
|
|