summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/pod/perlref.pod
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1999-05-02 14:33:17 +0000
committermarkm <markm@FreeBSD.org>1999-05-02 14:33:17 +0000
commit77644ee620b6a79cf8c538abaf7cd301a875528d (patch)
treeb4adabf341898a4378f4b7f8c7fb65f3f7c77769 /contrib/perl5/pod/perlref.pod
parent4fcbc3669aa997848e15198cc9fb856287a6788c (diff)
downloadFreeBSD-src-77644ee620b6a79cf8c538abaf7cd301a875528d.zip
FreeBSD-src-77644ee620b6a79cf8c538abaf7cd301a875528d.tar.gz
Maintenance releace 3 of perl5.005. Includes support for threads.
Diffstat (limited to 'contrib/perl5/pod/perlref.pod')
-rw-r--r--contrib/perl5/pod/perlref.pod14
1 files changed, 11 insertions, 3 deletions
diff --git a/contrib/perl5/pod/perlref.pod b/contrib/perl5/pod/perlref.pod
index 66b1a7d..596ff72 100644
--- a/contrib/perl5/pod/perlref.pod
+++ b/contrib/perl5/pod/perlref.pod
@@ -2,6 +2,12 @@
perlref - Perl references and nested data structures
+=head1 NOTE
+
+This is complete documentation about all aspects of references.
+For a shorter, tutorial introduction to just the essential features,
+see L<perlreftut>.
+
=head1 DESCRIPTION
Before release 5 of Perl it was difficult to represent complex data
@@ -89,7 +95,9 @@ a list of references!
@list = \($a, @b, %c); # same thing!
As a special case, C<\(@foo)> returns a list of references to the contents
-of C<@foo>, not a reference to C<@foo> itself. Likewise for C<%foo>.
+of C<@foo>, not a reference to C<@foo> itself. Likewise for C<%foo>,
+except that the key references are to copies (since the keys are just
+strings rather than full-fledged scalars).
=item 3.
@@ -448,7 +456,7 @@ symbolic references. Lexical variables (declared with my()) aren't in
a symbol table, and thus are invisible to this mechanism. For example:
local $value = 10;
- $ref = \$value;
+ $ref = "value";
{
my $value = 20;
print $$ref;
@@ -551,7 +559,7 @@ access to those variables even though it doesn't get run until later,
such as in a signal handler or a Tk callback.
Using a closure as a function template allows us to generate many functions
-that act similarly. Suppopose you wanted functions named after the colors
+that act similarly. Suppose you wanted functions named after the colors
that generated HTML font changes for the various colors:
print "Be ", red("careful"), "with that ", green("light");
OpenPOWER on IntegriCloud