Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / bsd / am-utils / dist / m4 / chop-aclocal.pl
blob2bf6b75f4c1871a13fe1c86842a9d838b3e1b7f1
1 #!/bin/perl -w
3 $seq = 1;
4 $file = "";
5 $file = sprintf("tmp/%02d.m4", $seq);
6 open(FILE, ">$file") || die "cannot open \"$file\": $!";
7 printf(STDOUT "FILE: $file\n");
8 while (<>) {
9 if (/^$/) {
10 close(FILE);
11 $seq++;
12 $file = sprintf("tmp/%02d.m4", $seq);
13 open(FILE, ">$file") || die "cannot open \"$file\": $!";
14 printf(STDOUT "FILE: $file\n");
15 next;
17 printf FILE;
19 close(FILE);