summaryrefslogtreecommitdiff
path: root/pod/perlfunc.pod
diff options
context:
space:
mode:
authorLarry Wall <larry@wall.org>1999-09-24 14:59:37 -0700
committerGurusamy Sarathy <gsar@cpan.org>1999-09-25 06:44:47 +0000
commit77ca0c92d2c0e47301d906d355d9ab3afb6f6bcb (patch)
treeb60e0c33e2b10b0977fb99fb6da0dcad45134146 /pod/perlfunc.pod
parent84e30d1a3b7cc368d7f93dd2b009e9fd64756759 (diff)
downloadperl-77ca0c92d2c0e47301d906d355d9ab3afb6f6bcb.tar.gz
Re: [PATCH 5.005_61] "our" declarations
Message-Id: <199909250459.VAA27506@kiev.wall.org> p4raw-id: //depot/perl@4227
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r--pod/perlfunc.pod12
1 files changed, 12 insertions, 0 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 237a38ddf8..82c052148b 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -2700,6 +2700,18 @@ Returns the numeric (ASCII or Unicode) value of the first character of EXPR. If
EXPR is omitted, uses C<$_>. For the reverse, see L</chr>.
See L<utf8> for more about Unicode.
+=item our EXPR
+
+An C<our> declares the listed variables to be valid globals within
+the enclosing block, file, or C<eval>. That is, it has the same
+scoping rules as a "my" declaration, but does not create a local
+variable. If more than one value is listed, the list must be placed
+in parentheses. The C<our> declaration has no semantic effect unless
+"use strict vars" is in effect, in which case it lets you use the
+declared global variable without qualifying it with a package name.
+(But only within the lexical scope of the C<our> declaration. In this
+it differs from "use vars", which is package scoped.)
+
=item pack TEMPLATE,LIST
Takes a list of values and packs it into a binary structure,