#!/usr/bin/perl use strict; use warnings; use Time::Piece; use Time::Piece::month_names(@months); my $t = Time::Piece->new(); my $mon = $t->mon; my $month = $t->monthname; my $year = $t->year; my @all_months = map sprintf( "%s", $_, $month ), 1 .. 12; # $mon foreach my $month ( @all_months ) { print "$month\n"; }