in reply to Array statistics
my @array = ('foo', 'foo', 'bar', 'foo', 'bar', 'baz'); my %count; $count{$_}++ for @array; for(sort(keys(%count))) { print "$_: $count{$_}\n"; } [download]
I'm sure you can work out how to then calculate the percentages.