in reply to positions of all occurrences of a substring in a string
Read perldoc perlvar. pos gives you the last position of the match. Instead:
perl -e '$str = q|aaabbbcccddd|; while($str=~m/(\S)\1\1/g){print @-[0] +};' 0369
Celebrate Intellectual Diversity
|
|---|