in reply to Re^4: Proper usage of rindex function?
in thread Proper usage of rindex function?
That assumes the string ends in a dot; it won't find a letter at the final position. Also, the backtracking on the plus modifier is going to kill performance on long strings. You might want to use something like reverse($str) =~ /[ATCG]/.