in reply to RFC: List of first day of each month

TIMTOWTDI, of course. A slightly different approach, still with Time::Piece but adding a month at a go. It's shorter and (to me) a little clearer.

#!/usr/bin/env perl use strict; use warnings; use Time::Piece '1.32'; my $date = localtime->add_years (-4)->truncate (to => 'year'); my $end_date = localtime; while ($date <= $end_date) { print "$date\n"; $date = $date->add_months (1); }

There's nothing wrong with your method AFAICS.