my $min, $max;
my $count = 0;
while(<>) {
    chomp;
    my $ts = $_;
    $min = $ts if (!defined($min));
    $max = $ts;
    $count++;
    if ($count > 1) {
        my $fr = ($count -1) * 1000. / ($max - $min);
        print ">>> $fr\n";
    }
}
