Help for this page
use strict; use warnings; my $string = 'ABCDEFGHIJKL'; print "$1$2 at ".pos($string)."\n" while ($string =~ /(.)(?=(...))/g);
print "$1$2 at ". ($-[0] + 1) ."\n" while ($string =~ /(.)(?=(...))/g) +;