use strict; my ($day, $month) = ( localtime() )[3..4]; $month++; print $month.'-'.$day;