sub foo { $_[0]='foo' } my $x='bar'; foo($x); print $x; #prints 'foo'