... And, as would follow from chromatic's
answer, if you modify the references within a
subroutine, you'll also modify the values those
references point to, outside the subroutine.
my $str = "foo";
print $str, "\n";
change(\$str);
print $str, "\n";
sub change {
my $ref = shift;
$$ref = "bar";
}