Uncomment your print ("$dm $dmm");. You'll see that you actually have the literal strings '&date_manip' and '&date_manip1(1)' in them. That's why they're not matching something that looks like a date.
Just use:
$dm = date_manip(); $dmm = date_manip1(1);
And you'll be a lot closer.
You also may wish to check out Date::Calc and Date::Manip and choose one for your date routines.
In reply to Re^3: regex match with interpolated pattern
by Zed_Lopez
in thread regex match with interpolated pattern
by drock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |