
    #   Print histogram of minutes with given numbers of counts

    require 'csv.pl';

    $cmin = 99999999;
    $cmax = 0;

    while ($l = <>) {
        chop($l);
        @f = &csv($l);
#       print(join(',', @f) . "\n");
        $counts = int($f[0] / 100);
#       $time = $f[1];

        if ($counts < $cmin) {
            $cmin = $counts;
        }
        if ($counts > $cmax) {
            $cmax = $counts;
        }

        $histo[$counts]++;
    }

    for ($i = 0; $i <= $cmax; $i++) {
        if (!(defined $histo[$i])) {
            $histo[$i] = 0;
        }
        print("$i,$histo[$i]\n");
    }
