- or download this
my $str = 'aabcdabcabcecdecd';
- or download this
(abc => 3, bc => 3, cd => 3, ecd => 2)
- or download this
sub count1 {
local $_=shift;
...
\%count;
}
- or download this
$VAR1 = {
'cd' => 3,
...
'abc' => 3,
'bc' => 3
};
- or download this
$VAR1 = {
'cd' => 3,
...
'd' => 3,
'bc' => 3
};
- or download this
sub count2 {
my $s=shift;
...
} 0..length($s)-1;
\%count;
}
- or download this
$VAR1 = {
'ecd' => 2,
'abc' => 3,
'3' => 2
};