Just another Perl shrine | |
PerlMonks |
Re^3: A function to determine if a string is numericby hippo (Bishop) |
on May 18, 2020 at 12:19 UTC ( [id://11116897]=note: print w/replies, xml ) | Need Help?? |
The documentation explains this. The various patterns are not anchored. That is, a pattern like $RE {num} {int} will match against "abc4def", because a substring of the subject matches. This is by design, and not a bug. If you want the pattern to be anchored, use something like:
In Section
Seekers of Perl Wisdom
|
|