use POSIX 'strftime'; print strftime "%m" => localtime;