summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xDocumentation/cat-texi.perl15
1 files changed, 9 insertions, 6 deletions
diff --git a/Documentation/cat-texi.perl b/Documentation/cat-texi.perl
index b1fe52e8b9..1bc84d3c7c 100755
--- a/Documentation/cat-texi.perl
+++ b/Documentation/cat-texi.perl
@@ -1,9 +1,12 @@
#!/usr/bin/perl -w
+use strict;
+use warnings;
+
my @menu = ();
my $output = $ARGV[0];
-open TMP, '>', "$output.tmp";
+open my $tmp, '>', "$output.tmp";
while (<STDIN>) {
next if (/^\\input texinfo/../\@node Top/);
@@ -13,9 +16,9 @@ while (<STDIN>) {
}
s/\(\@pxref\{\[(URLS|REMOTES)\]}\)//;
s/\@anchor\{[^{}]*\}//g;
- print TMP;
+ print $tmp $_;
}
-close TMP;
+close $tmp;
printf '\input texinfo
@setfilename gitman.info
@@ -34,10 +37,10 @@ for (@menu) {
print "* ${_}::\n";
}
print "\@end menu\n";
-open TMP, '<', "$output.tmp";
-while (<TMP>) {
+open $tmp, '<', "$output.tmp";
+while (<$tmp>) {
print;
}
-close TMP;
+close $tmp;
print "\@bye\n";
unlink "$output.tmp";