--- /dev/null
+#!/usr/bin/perl -w
+
+while(<>) {
+ if(/^(\d+)\s+([\d.]+)(-([\d.]+))?$/) {
+ if(defined($4)) {
+ $temp{$1} = ($2 + $4) / 2;
+ } else {
+ $temp{$1} = $2;
+ }
+ }
+}
+
+print "#name: ct\n";
+print "#type: matrix\n";
+print "#rows: 1\n";
+print ("#columns: " . scalar(keys %temp) . "\n");
+for $k (sort keys %temp) {
+ print " $k";
+}
+print "\n";
+
+print "#name: cd\n";
+print "#type: matrix\n";
+print "#rows: 1\n";
+print ("#columns: " . scalar(keys %temp) . "\n");
+for $k (sort keys %temp) {
+ print " $temp{$k}";
+}
+print "\n";