in reply to Speeding permutation counting

Is this what you want, as tye pointed out,
#!/usr/bin/perl -w use strict; use Smart::Comments '###'; my $report ={}; my @strings = qw( 0101 0001 ); for (@strings){ my $string = $_; $report->{$_}++ for $string=~/../g; } ### $report ### should be ### 01 3 ### 00 1
Or should the result be 01=3x, 10=1x, 00=2x ?