perlfaq3: Is it safe to return a reference to local or lexical data?

[email protected] (_brian_d_foy)
Newsgroups perl.perlfaq.workers
Message-ID <291220020244224928%[email protected]>
* Is it safe to return a reference to local or lexical data?
   + the $i does not do anything, so I removed it.


Index: perlfaq3.pod
===================================================================
RCS file: /cvs/public/perlfaq/perlfaq3.pod,v
retrieving revision 1.30
diff -u -d -r1.30 perlfaq3.pod
--- perlfaq3.pod        6 Dec 2002 07:40:11 -0000       1.30
+++ perlfaq3.pod        29 Dec 2002 10:42:44 -0000
@@ -641,7 +641,7 @@
        return \@a;
     }
 
-    for $i ( 1 .. 10 ) {
+    for ( 1 .. 10 ) {
         push @many, makeone();
     }

-- 
brian d foy, [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.