#!/usr/bin/perl -w use strict; ##my $debug; my $debug = 1; my %trans; &get_trans("trans.txt"); if($debug) {for my $i (sort {$a<=>$b}keys %trans) {print STDERR "$i $trans{$i}\n"}} exit; sub get_trans { my ($infile) = @_; open(TS,"<$infile") or die "Cannot open <$infile: $!"; while() { chomp; next unless $_; my @a = split; my ($i,$tr) = ($a[0],$a[$#a]); if($tr =~ /^[\d:]+$/) { $trans{$i} = $tr; } else { print STDERR "Bad time in $_\n"; } } close(TS); return }