in reply to regex transforms of object attributes

$self->content("bar".substr($self->content,3));
Assuming bar is at the beginning of the string.

Update: Otherwise (cheating)

s/foo/bar/, $self->content($_) for $self->content;
But you have to have the $_ variable there because s/// needs a variable to act upon. It's one the things that annoy me sometimes.