in reply to RE - match from right

That's a good description: b not followed by a string containing a b. You could also do it with "sexeger" (using a regex on the reverse of the string):
$string = reverse $string; $string =~ s/b/x/; $string = reverse $string;
though that seems a little excessive for this case. The other usual way to do it is:
$string =~ s/(.*)b/$1x/;
or (at least as clunky as your original):
$string =~ m/.*(?=b)/g and $string =~ s/\Gb/x/;
Finally, you can do it without using a regex at all:
substr($string, rindex($string, 'b'), 1) = 'x';

Caution: Contents may have been coded under pressure.