The problem is that for a given line with matches for both $MMDDYYYY and $DDMM the pattern for $DDMM is reported even though the text that matches $MMDDYYYY is first in the line.Drop the /g modifier in your match condition and you should get the desired results (i.e $MMDDYYYY should match first).
_________
broquaint
In reply to Re: qr() match order with multiple patterns
by broquaint
in thread qr() match order with multiple patterns
by gnu@perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |