my $new_serial = strftime("%Y%m%d",gmtime())."01";
if ($ymd eq strftime("%Y%m%d",gmtime())) {
my $new_serial = strftime("%Y%m%d",gmtime())."01";
if ($ymd eq strftime("%Y%m%d",gmtime())) {
}
$fh_contents =~ s/(IN\s+SOA\s+\S+\s+\S+\s*(?:\s*\;.+\n)*\((?:\s*\;.+\n)*\s*)(\d+)/${1}${new_serial}/;
print {$fh_new} $fh_contents;
}
$fh_contents =~ s/(IN\s+SOA\s+\S+\s+\S+\s*(?:\s*\;.+\n)*\((?:\s*\;.+\n)*\s*)(\d+)/${1}${new_serial}/;
print {$fh_new} $fh_contents;