mail-uplift disentangle side-effects from return codes
authorTony Finch <dot@dotat.at>
Fri, 28 Nov 2014 19:38:00 +0000 (19:38 +0000)
committerTony Finch <dot@dotat.at>
Fri, 28 Nov 2014 19:38:00 +0000 (19:38 +0000)
ipreg-mail-uplift

index 808363f..0dd8cb7 100755 (executable)
@@ -13,16 +13,17 @@ for my $f (<ipreg-mail/Institutions/*>) {
   print "processing $f\n";
   open my $in, '<', $f
     or shite "open < $f";
-  my @f = map s{^[+][+][+]\s+
-               ([a-z]+[0-9]*[ ] # user
-               [A-Z][a-z][a-z][ ] # day
-               [A-Z][a-z][a-z])\s+ # mon
-               ([0-9]+)\s+ # date
-               ([0-9][0-9]:[0-9][0-9]:[0-9][0-9][ ] # time
-               [A-Z][A-Z][A-Z][ ] # zone
-               [12][0-9][0-9][0-9])\s*$ # year
-              }{sprintf "From %s %2d %s\n", $1, $2, $3}xe,
-              <$in>;
+  my @f = <$in>;
+  map s{^[+][+][+]\s+
+       ([a-z]+[0-9]*[ ] # user
+       [A-Z][a-z][a-z][ ] # day
+       [A-Z][a-z][a-z])\s+ # mon
+       ([0-9]+)\s+ # date
+       ([0-9][0-9]:[0-9][0-9]:[0-9][0-9][ ] # time
+       [A-Z][A-Z][A-Z][ ] # zone
+       [12][0-9][0-9][0-9])\s*$ # year
+       }{sprintf "From %s %2d %s\n", $1, $2, $3}xe,
+       @f;
   open my $out, '>', "$f.new"
     or shite "open > $f.new";
   print $out @f;