in reply to extract month and year from localtime

use POSIX(); my @lt = localtime ; my $year = POSIX::strftime( '%Y', @lt ); my $month = POSIX::strftime( '%m', @lt );
See Re: error on file open, Re^2: Date plus Time sort from file ( Time::Piece->strptime/strftime example, Re: Subtracting minutes from a string ( Time::Piece->strptime )