[comp.lang.perl] Question about local

france@motcid.UUCP (Robert France) (04/18/91)

I've written a program to un-nest ASN.1 definitions (among other
things). It uses a recursive subroutine with one parameter. The
subroutine uses evals to create arrays for each structure.  For any
cases nested >= three levels deep, it core dumps. It core dumps if I
use:

local($_) = $_[0];	#seems to be scalar = scalar

but works okay with:
$_ = $_[0];	# scalar = scalar, no big surprise here

SunOS 4x
perl -v:
>$RCSfile: perl.c,v $$Revision: 4.0.1.1 $$Date: 91/04/11 17:49:05 $
>Patch level: 3

I've also tried this on versions 3.044, 4.000. Any ideas why this
happens?  I've read what the book has to say on subroutines, parameter
passing and scopes, but either it bounced off, or I've missed
something (or maybe a bug?). The first case works okay for cases that
don't recurse, but as soon as it hits the limit, it dies. I can
provide the code itself, and/or -D listings if anyone is interested.

On a somewhat related topic, in trying to track the problem down, I
used several -D combinations. Any pointers to where I could get more
information on what the dumps mean? Some of the information is quite
clear, and some of it is a little more obscure. Even pointers to
relevant code would be great!

Either posted responses or e-mail is fine.

Bob
P.S. The book was well worth the wait! Congratulations to all involved.
motcid!marble!france@uunet.UU.NET