if (my ($inpmm, $inpdd, $inpyyyy) = @date[1] =~ '(\d+)/(\d+)/(\d+)') { { print "@date[1] : Has been split to $certyyyy, $certmm, $certdd"; my @certdate=(0, 1, 1, $certdd, $certmm-1, $certyyyy); print "---@certdate"; # Just to see how it gets formed my $inptime=timelocal_nocheck(@certdate); print "$inptime"; my $timediff=$inptime - $lmtime; print "$timediff"; if ($timediff <= 2628000) { <> } else { <> } } else { print "Not in Format" } #### 08/12/2016 : Has been split to 2016, 08, 12---0 1 1 12 7 2016