use Date::Simple qw/today/; use 5.010; my $d = today; my $month = $d->month; $d-- while $month == $d->month; say $d;
Or
use Date::Simple qw/today ymd/; use 5.010; my $d = today; $d = ymd($d->year, $d->month, 1) - 1; say $d;
In reply to Re: How to find the last date of the previous month?
by moritz
in thread How to find the last date of the previous month?
by MrSnrub
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |