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:my $integer = $RE {num} {int}; $subj =~ /^$integer$/ and print "Matches!\n";
In reply to Re^3: A function to determine if a string is numeric
by hippo
in thread A function to determine if a string is numeric
by juliosergio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |