Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!apple!sun-barr!newstop!sun!amdcad!pepsi!dwork From: dwork@pepsi.amd.com (Jeff Dwork) Newsgroups: comp.lang.perl Subject: Re: Bug with splice in subroutine Message-ID: <29592@amdcad.AMD.COM> Date: 22 Mar 90 22:13:08 GMT References: <29584@amdcad.AMD.COM> Sender: news@amdcad.AMD.COM Reply-To: dwork@pepsi.AMD.COM (Jeff Dwork) Organization: Advanced Micro Devices, Inc. Sunnyvale CA Lines: 28 In article <29584@amdcad.AMD.COM> dwork@pepsi.AMD.COM (Jeff Dwork) writes: >My sun3 dumps core on the following perl script. It works ok on a sun4. >OS is 4.0.3. This also fails on Patchlevel 15. % cat bug.pl #!/usr/local/bin/perl sub subx { local(@alx,@spalx,$x); # only @alx needs to be local for bug @alx = (1,2,3,4,5,6,7,8); @spalx = splice(@alx,0,5); $x = $#spalx; print "$x"; print "\n"; print "returning from subx\n"; } print "before subx\n"; &subx; print "returned ok\n"; 1; Jeff Dwork | 408-749-2356 | dwork@AMD.COM Advanced Micro Devices, M/S 45 |--------------------------------------- PO Box 3453 | The above opionions are mine, Sunnyvale, Ca 94088 | not AMD's.