Simple histogramming in Perl, but kinda fast