$ perl -E ' my $fo = ""; update(\$fo); print "|$fo|"; sub update { my ($arg) = @_; $$arg .= "XXX"; } ' |XXX|