automatically freeing the thing referred to when its reference count goes
to zero. (Reference counts for values in self-referential or
cyclic data structures may not go to zero without a little help; see
-L<perlobj/"Two-Phased Garbage Collection"> for a detailed explanation.)
+L</"Circular References"> for a detailed explanation.)
If that thing happens to be an object, the object is destructed. See
L<perlobj> for more about objects. (In a sense, everything in Perl is an
object, but we usually reserve the word for references to objects that
${$name x 2} = 3; # Sets $foofoo
$name->[0] = 4; # Sets $foo[0]
@$name = (); # Clears @foo
- &$name(); # Calls &foo() (as in Perl 4)
+ &$name(); # Calls &foo()
$pack = "THAT";
${"${pack}::$name"} = 5; # Sets $THAT::foo without eval
=head2 Not-so-symbolic references
-Since Perl verion 5.001, brackets around a symbolic reference can simply
+Brackets around a symbolic reference can simply
serve to isolate an identifier or variable name from the rest of an
expression, just as they always have within a string. For example,
print "${push}over";
has always meant to print "pop on over", even though push is
-a reserved word. In 5.001, this was generalized to work the same
+a reserved word. This is generalized to work the same
without the enclosing double quotes, so that
print ${push} . "over";
print ${ push } . "over";
-will have the same effect. (This would have been a syntax error in
-Perl 5.000, though Perl 4 allowed it in the spaceless form.) This
+will have the same effect. This
construct is I<not> considered to be a symbolic reference when you're
using strict refs:
in the F<t/op/ref.t> regression test in the Perl source directory.
See also L<perldsc> and L<perllol> for how to use references to create
-complex data structures, and L<perltoot>, L<perlobj>, and L<perlbot>
+complex data structures, and L<perlootut> and L<perlobj>
for how to use them to create objects.