The issue is that the compilation of the (?{...}) in the regex creates closures on $year, $month and $day and the second time through the sub the my ($year, $month, $day); creates different instances of the variables which are not the ones the regex is using. Change my ($year,$month,$day); to our ($year,$month,$day);.
In reply to Re: regex and embedded perl code
by GrandFather
in thread regex and embedded perl code
by neybar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |