in reply to Print every past three months from current month
my @three_months; for (1..3) { $month_number--; $month_number ||= 12; unshift(@three_months,$month_number); } [download]