12345678
my $date = '201006';my $year = substr $date, 0, 4;my $date = substr $date, 4, 2;if ($year > 2099 || $year < 2000) { die "Year out of range. Got $year, expected 2000..2099\n";}...