in reply to Pattern match location finding
my $ind = -1; while (($ind = index($string, $substring, $ind+1) >= 0) { push @offsets, $ind } [download]