Keep It Simple, Stupid | |
PerlMonks |
curious regex result for perl 5.8.8by erodrig (Initiate) |
on Jun 20, 2016 at 21:56 UTC ( [id://1166147]=perlquestion: print w/replies, xml ) | Need Help?? |
erodrig has asked for the wisdom of the Perl Monks concerning the following question: Consider the following program which just does a regex on two array entries:
When I run this on Linux perl 5.8.8 $2 does not seem correct for the second name: The second name should have the same values since the regex match fails the second time, but $2 mysteriously takes "21." from the first entry. Can this be a problem with perl 5.8.8? See below:
With perl 5.10.1 this seems to run as I would expect it to:
Thanks for any comments.
Back to
Seekers of Perl Wisdom
|
|