Help for this page
$n=4; $str="abababbcad"; ... while($str =~ m[(?=([abcd]{$n})).]g){ ++$count{ $1}; }
$count{$1}=1
$str1="abad"; $str2="aaab"; $n=2;