[svn:perlfaq] r8102 - perlfaq/trunk

[email protected] Thu, 23 Nov 2006 12:09:21 -0800 (PST)
Newsgroups perl.cvs.perlfaq
Message-ID <[email protected]>
Author: comdog
Date: Thu Nov 23 12:09:11 2006
New Revision: 8102

Modified:
   perlfaq/trunk/perlfaq7.pod

Log:
* How do I create a static variable?
    + fixed function name confusion


Modified: perlfaq/trunk/perlfaq7.pod
==============================================================================
--- perlfaq/trunk/perlfaq7.pod	(original)
+++ perlfaq/trunk/perlfaq7.pod	Thu Nov 23 12:09:11 2006
@@ -468,11 +468,11 @@
         sub counter { $count++ }
     }
 
-    my $start = count();
+    my $start = counter();
 
-    .... # code that calls count();
+    .... # code that calls counter();
 
-    my $end = count();
+    my $end = counter();
 
 In the previous example, you created a function-private variable
 because only one function remembered its reference. You could define