[EMAIL PROTECTED] wrote: > my $i=0; > dosomefunnierstuff(); > sub dosomefunnierstuff { > my $funnierstuff; > if($funnierstuff=~/funnier/) { > dosomefunnierstuff(); > } else { > $funnierstuff="funnier".$i++; > } > print "Funnierstuff is $funnierstuff\n"; > } > > That proves the point a bit more clearly. It will show that each > layer of the "stack" keeps its own discreet copy of the variable. Oh, I see what you're talking about. That's a closure. It's a language feature, so changing that behavior would be significant. This shouldn't be a problem if you simply avoid using closures in a recursive algorithm. In your example, I believe only the value of $i will be saved each time, since $funnierstuff will go out of scope at the end of the block and get garbage collected. - Perrin
- Re: Modperl/Apache deficiencies... Memo... Perrin Harkins
- Re: Modperl/Apache deficiencies... Memo... shane
- Re: Modperl/Apache deficiencies... Memo... Jim Winstead
- Re: Modperl/Apache deficiencies... Memo... shane
- Re: Modperl/Apache deficiencies... Memo... shane
- Re: Modperl/Apache deficiencies... Memo... Jason Terry
- Re: Modperl/Apache deficiencies... Memo... shane
- Re: Modperl/Apache deficiencies... Memo... Ken Williams
- Re: Modperl/Apache deficiencies... Memo... Matt Sergeant
- Re: Modperl/Apache deficiencies... Memo... Jim Winstead
- Re: Modperl/Apache deficiencies... Memo... Perrin Harkins
- Re: Modperl/Apache deficiencies... Memo... Autarch
- Re: Modperl/Apache deficiencies... Memo... Doug MacEachern
- Re: Modperl/Apache deficiencies... Memo... Gunther Birznieks
- Apache::AuthCookie or Apache::AuthDBI or Ap... Kenneth Frankel
- Re: Apache::AuthCookie or Apache::AuthD... Vivek Khera
- Re: Modperl/Apache deficiencies... Memory usage. Gunther Birznieks
- RE: Modperl/Apache deficiencies... Memory usage. Jeff Stuart
- RE: Modperl/Apache deficiencies... Memory usage. Gunther Birznieks
- RE: Modperl/Apache deficiencies... Memory usage... Jeff Stuart
- mod_perl/apache and db/content server Angel R. Rivera