in reply to RE - match from right

You can reverse the string.
$_ = reverse $string; s/b/x/; $string = reverse $_;
Boris