#!/usr/bin/env perl
# Collect td files from working subdirectories and join the files.
# Rok Zitko, zitko@theorie.physik.uni-goettingen.de, Nov 2008, Aug 2009

use warnings;

my @dirs = <[1-9]*>;

my $fn = "td.dat";
unlink $fn;

foreach (@dirs) {
    my $dir = $_;
    if (-d $dir) {
	system("cat $dir/td >>$fn");
    }
}
