[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Writing line-ending agnostic scripts? (fwd)



Well, I've never actually tried recursion under MacPerl, but
the standard Perl boasts that it has capabilities for infinite
recursion, granted that you have enough memory.  I just quickly
tried out the following on my unix box:

	$k = 0;
	sub func { 
		$k++;
		print $k, "\n";
		&func();
	}
	&func();

Et voila.  I hit about 20MB's of RAM being dedicated to perl after
about 80,000 levels of recursion.  I presume that MacPerl's limit
would be dependent on the maximum size of the MacPerl heap.

-David

> I have a new question.  :-)
> 
> MacPerl is recursive - yes?  Is there a maximum level to
> which it will do this or is it just memory dependent?  I
> remember some of the old programming languages had a
> certain depth they would go to before dying because the
> stack overflowed.  Does MacPerl have this same kind of a
> restriction?
> 
> ***** Want to unsubscribe from this list?
> ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch
> 


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch