in reply to How do I check if a scalar in @_ is writable?
The intent of your function is to modify $body (the 3rd argument), so restrict yourself to modifying only $body. It is (imho) a better idea to do it like$_[0] ||= "anonymous"; # <<<<<<<<<<<<<<<<<<< wrong wrong wrong
sub roy { my( $f, $b, $modifythisREF ) = @_; $$modifythisREF =~ s/yoda/yoda/g; return; } roy( "", "", \$body ); ...
|
|---|