--- a/update-serial Fri Jan 18 21:41:31 2008 +0000
+++ b/update-serial Mon Aug 02 15:50:54 2010 +0200
@@ -10,6 +10,9 @@
# the current directory)
# . optionally reload the named
+use strict;
+use warnings;
+
use File::Basename;
use File::Copy;
my $ME = basename $0;
@@ -17,11 +20,12 @@
my $verbose = 0;
my $opt_yes = 0;
+
sub cleanup() { unlink @tmpfiles; }
END { cleanup(); }
$ARGV[0] eq "-y" and $opt_yes = 1, shift;
-@Zones = @ARGV ? @ARGV : </etc/bind/p/*>;
+my @Zones = @ARGV ? @ARGV : </etc/bind/p/*>;
MAIN: {
@@ -35,7 +39,7 @@
$date = "$yy$mm$dd";
- while ($file = shift @Zones) {
+ while (my $file = shift @Zones) {
local (*I, *O);
my $done = 0;