in reply to Regular expression
How about this?
my $maxdate = "2006-06-06"; my( $m_year, $m_month ) = split /-/, $maxdate; [download]
Sometimes it's about using the right tool for the task. split comes in handy.
Dave