# foo() is a sub from a 3rd party library you have no control over sub foo { my $r = \$_[0] } my native str $s = "..."; foo($s);