#!/usr/local/bin/perl -w use strict; use Log::Log4perl qw(:easy); use Statistics::Histogram; use Getopt::Long; GetOptions( \my %opts, "verbose" ); Log::Log4perl->easy_init( $opts{ verbose } ? $DEBUG : $INFO ); my @data = (); my $clowns = 0; my $stars = 0; for ( 1..100 ) { my $talent = `./secretary`; chomp $talent; DEBUG "Result: $talent"; if( $talent >= 10 ) { $stars++; } else { $clowns++; } push @data, $talent; } INFO get_histogram( \@data, 20 ); INFO "Stars: $stars Clowns: $clowns";