- or download this
use strict;
use warnings;
...
$count{$_}++ foreach @numbers;
print "$_ occurs $count{$_} time(s)\n" foreach sort { $a <=> $b } keys
+ %count;
- or download this
use strict;
use warnings;
...
hash => \&hash,
array => \&array,
} );
- or download this
Rate hash array
hash 19.4/s -- -55%
array 43.2/s 122% --