- or download this
{
my $a;
$a = \$a; # reference count of $a increases to 1
} # $a goes out of scope, but $a stays in use because of it
+s reference count
- or download this
my $a;
$a = \$a; # reference count of $a increases to 1
undef $a; # reference count decreases to 0
} # $a goes out of scope, $a gets freed because of its refe
+rence count of 0
- or download this
$retVal = $someObject->bar()->doSomething();
$retVal = \$retVal;
- or download this
my $myVal = $someObject->bar()->doSomething();
$retVal = \$myVal;