#! /usr/bin/perl -w use strict; use Symbol; sub usage { print <> tmp.raw "; print "$cmd\n"; system $cmd; my $end = $start{$arg} + $len{$arg}; print "$start{$arg} + $len{$arg} = $end\n"; } else { print "Can't find '$arg'\n"; } } sub setup{ my $inch = Symbol::gensym(); my $file = "$dir/voice.vce"; open($inch, "<$file") || die "Cannot open input file '$file'\n"; my $header = <$inch>; chomp $header; my $ii=1; liner: while (my $line = <$inch>){ chomp $line; my @word = split(" ", $line); my $nn = @word; if ($nn != 3) { next liner; } my $id = lc($word[0]); my $st = $word[1]; my $ln = $word[2]; if ($ln =~ s/^x//) { $ln = $ln - $st; print "$id $st $ln\n"; } $start{$id} = $st; $len{$id} = $ln; ##print "$ii $nn '$line'\n"; $ii++; } print "(($header)) --> $ii\n"; }