summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-06-03 07:59:48 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-06-03 07:59:48 +0000
commit3a205795a9fa8c21e484e9a8efe6e9257c24bd1e (patch)
treee70231bad2993f323e7b343a027cd9f36ea6e3d5
parent6670e5e7b286c73a0b574b82775e6e4a452e6dcc (diff)
downloadperl-3a205795a9fa8c21e484e9a8efe6e9257c24bd1e.tar.gz
Indent fix
p4raw-id: //depot/perl@24685
-rw-r--r--pod/perlfaq7.pod16
1 files changed, 8 insertions, 8 deletions
diff --git a/pod/perlfaq7.pod b/pod/perlfaq7.pod
index ac9b31f07a..b9548fb792 100644
--- a/pod/perlfaq7.pod
+++ b/pod/perlfaq7.pod
@@ -431,16 +431,16 @@ can access the value (and each time you do, you increment the value).
The data in chunk of memory defined by C<$count> is private to
C<counter>.
- BEGIN {
- my $count = 1;
- sub counter { $count++ }
- }
+ BEGIN {
+ my $count = 1;
+ sub counter { $count++ }
+ }
- my $start = count();
+ my $start = count();
- .... # code that calls count();
+ .... # code that calls count();
- my $end = count();
+ my $end = count();
In the previous example, you created a function-private variable
because only one function remembered its reference. You could define
@@ -457,7 +457,7 @@ there is no other way to access it.
my $count = 1;
sub increment_count { $count++ }
sub return_count { $count }
- }
+ }
To declare a file-private variable, you still use a lexical variable.
A file is also a scope, so a lexical variable defined in the file