my $maxdate = "2006-06-06"; my( $m_year, $m_month ) = split /-/, $maxdate;