"That's not strictly accurate."
Oh yes it is, probably! If there was no match then it's easy to argue that there should be no capture. If there was no capture the contents of the capture variables should be undef. The current "last capture" behavior then can easily and accurately be described as bogus. :-)
I can understand that there are compelling (probably historical compatibility) reasons for the current behavior. In a big picture sense that doesn't make the behavior less bogus.
Besides, bogus is a fun word so I like to use it - what's bogus with that?
In reply to Re^3: curious regex result for perl 5.8.8
by GrandFather
in thread curious regex result for perl 5.8.8
by erodrig
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |