References (smart pointers)
A reference is a pointer that is used to access some Perl data or function.
There is a reference count for each item.
$scalarref = \$scalar;
$five = 5;
$fiveref = \$five;
print 1 + $$fiveref; # prints 6.
Previous slide
Next slide
Back to first slide
View graphic version