|
|
| There's more than one way to do things | |
| PerlMonks |
Is it unsafe to return a pointer to local data?by faq_monk (Initiate) |
| on Oct 13, 1999 at 02:56 UTC ( [id://786]=perlfaq nodetype: print w/replies, xml ) | Need Help?? |
|
Current Perl documentation can be found at perldoc.perl.org. Here is our local, out-dated (pre-5.6) version: No, Perl's garbage collection system takes care of this.
sub makeone {
my @a = ( 1 .. 10 );
return \@a;
}
for $i ( 1 .. 10 ) {
push @many, makeone();
}
print $many[4][5], "\n";
print "@many\n";
|
|