- or download this
$stats{ scalar( x() ) }++
- or download this
$stats{ x() }++
- or download this
$stats{ scalar( my @r = x() ) }++
- or download this
use strict;
use warnings;
...
my %stats;
$stats{ scalar( my @r = x() ) }++ for 1 .. 1000;
print Dumper( \%stats );
- or download this
$VAR1 = {
'6' => 81,
...
'1' => 123,
'10' => 117,
'5' => 108