home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!convex!convex!tchrist
- From: Tom Christiansen <tchrist@convex.COM>
- Subject: Re: Bug with foreach/local in 4.035
- Originator: tchrist@pixel.convex.com
- Sender: usenet@news.eng.convex.com (news access account)
- Message-ID: <1992Dec29.224047.20472@news.eng.convex.com>
- Date: Tue, 29 Dec 1992 22:40:47 GMT
- Distribution: comp
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- References: <SOUP.92Dec28105043@ampersand.ampersand.com>
- Nntp-Posting-Host: pixel.convex.com
- Organization: Convex Computer Corporation, Colorado Springs, CO
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 18
-
- From the keyboard of soup@ampersand.com (Doug Campbell):
- :There appears to be a bug (or at least a surprising behavior) in 4.035
- :regarding foreach and local. It seems that a construct like:
- :
- : foreach $i (@list)
- :
- :will cause a subsequent (down the call stack) "local ($i)" to cause the
- :item in @list currently referenced by $i to appear blank.
-
- That's a manifestation of "variable suicide". You can read about it
- in the FAQ.
-
- --tom
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
-
- stab_val(stab)->str_nok = 1; /* what a wonderful hack! */
- --Larry Wall in stab.c from the perl source code
-