#!/usr/bin/perl
#
# This just cats its input files together, but inserts  a  blank  line
# between  each file.  It's a pity that, among all the obscure options
# that've been added to cat(1), this feechur wasn't included.  We also
# trim  trailing  whitestuff from each line, and reduce multiple blank
# lines to a single blank line.  Maybe we should make  some  of  these
# things into options?  Naaah!

for $f (@ARGV) {
	if (open(F,$f)) {
		print "\n" if ($last && $files);
		$last = '';
		for $l (<F>) {
			chomp $l;
			if ($l || $last) {
				print "$l\n";
			}
			$last = $l;
		}
		++$files;
	} else {
		print STDERR "$0: Can't read \"$f\" [$~]\n";
	}
}
