$>perl -le"$srch='?';$txt='?i?a?b?adfads?';print pos($txt) - 1 while $txt =~ / \Q$srch\E/g;" 0 2 4 6 13