summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-01-22 22:19:45 +0000
committerNicholas Clark <nick@ccl4.org>2011-01-22 22:19:45 +0000
commite0b44199a03c8f4b454c18ecbb337f4facfcdc8c (patch)
tree863271f457ce35ef6c8ef0a4db686133ef42755a /regen
parent1f61f1191cda645b5e0f09904e55e8adb74c596c (diff)
downloadperl-e0b44199a03c8f4b454c18ecbb337f4facfcdc8c.tar.gz
"Don't repeat yourself" in regen/opcode.pl
Diffstat (limited to 'regen')
-rwxr-xr-xregen/opcode.pl9
1 files changed, 4 insertions, 5 deletions
diff --git a/regen/opcode.pl b/regen/opcode.pl
index 9d314f21e0..4515424fb7 100755
--- a/regen/opcode.pl
+++ b/regen/opcode.pl
@@ -487,11 +487,10 @@ sub gen_op_is_macro {
}
}
-print $oc "/* ex: set ro: */\n";
-print $on "/* ex: set ro: */\n";
-
-safer_close($oc);
-safer_close($on);
+foreach ($oc, $on) {
+ print $_ "/* ex: set ro: */\n";
+ safer_close($_);
+}
rename_if_different $opcode_new, 'opcode.h';
rename_if_different $opname_new, 'opnames.h';