sub valid_date($$$){ my ($day,$month,$year)=@_; $month--; my $epoch=timelocal(0,0,0,$day,$month,$year); my $vdate=localtime($epoch); my @compdate=($vdate->mday,$vdate->mon+1,$vdate->year+1900); for (0..2){print ; if($compdate[$_]!=$_[$_]){ return 0}} 1; }