in reply to HTTP::Proxy::BodyFilter Shezza No Voik

Right now, you're attempting to modify a copy of a scalar you never do anything with. Definitely bad. According to the docs you quoted, the var doesn't even contain a string. It contains a reference to the data. You should be doing

$$dataref =~ s/Perl/PERL/;

Note that the above is the same as

${$_[1]} =~ s/Perl/PERL/;

You probably want to use the /g modifier if you want to change more than just the first occurrence.

$$dataref =~ s/Perl/PERL/g;

Tested.