in reply to Re: 'Trying! to get! index functionality! in array context!?'
in thread Trying to get index functionality in array context

Quote the meta my friend, quote the meta, even if you don't use quotemeta ;D
$>perl -le"$srch='?';$txt='?i?a?b?adfads?';print pos($txt) - 1 while $ +txt =~ / \Q$srch\E/g;" 0 2 4 6 13