sub test { $_[0] = "new value"; } { my $var = "old value"; print("$var\n"); test($var); print("$var\n"); }