in reply to Array statistics
my @data = &initialize_it_the_way_you_want() ; my $total = @data ; # or scalar @data, explicitly die "give me arguments!" unless $total ; my %count ; my %perc ; map $count{$_}++,@data ; map { $perc{$_} = $count{$_}/$total } keys %count ; # Now you have recurrence counts on %count and # percentages on %perc to do whatever you want.
Ciao!
--bronto
# Another Perl edition of a song:
# The End, by The Beatles
END {
$you->take($love) eq $you->made($love) ;
}
|
|---|