my ($startdate, $enddate); $startdate .= "01" while( length( $startdate ) <= 8 ); $enddate .= "01" while( length( $enddate ) <= 8 );