12345678
my $string = '-13-4-1-2-3-13-1-13-4-1-2-3-13-1';my $search = '-13-1';pos = -1;while ( ($pos=index($string, $search, $pos)) > -1 ) { printf("found at pos %d\n", $pos++);}