in reply to RE - match from right

Without reversing the string:

$string =~ s/(.*)b/\1x/;

I don't know if that would be faster or slower than reversing it first.

TheEnigma