Ovid has asked for the wisdom of the Perl Monks concerning the following question:
I was trying to answer a question on the perl beginners list (see http://learn.perl.org/) when I dumped core with the following code.
use strict; my %allusers = ( 'users' => { 'user' => 'Test Account', '*Crudles' => 'Hello World', 'Crud' => 'Another Test', '*test' => 'Crud User' } ); foreach my $key ( %{ $allusers{ users } } ) { delete $allusers{ users }{ $key } if '*' eq substr $key, 0, 1; } # result: $ perl test.pl 0 [main] perl 374831 open_stackdumpfile: Dumping stack trace to +PERL.EXE.Stackdump Segmentation fault (core dumped)
perl -v output:
This is perl, v5.6.1 built for cygwin-multi Copyright 1987-2001, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using `man perl' or `perldoc perl'. If you have access to + the Internet, point your browser at http://www.perl.com/, the Perl Home Pa +ge.
This was cygwin running on Windows 98. Even when trying to run this at a DOS prompt, I get a modal dialog box that reads:
This program has performed an illegal operation and will be shut down. If the problem persists, contact the program vendor. PERL caused an invalid page fault in module PERL56.DLL at 017f:280705f1. Registers: yada, yada, yada
When running under DOS, it's 5.6.0. Is this a known bug? 'perl -c test.pl' tells me that my syntax is okay.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why does this dump core?
by danger (Priest) on Dec 11, 2001 at 15:34 UTC | |
|
Re: Why does this dump core?
by blakem (Monsignor) on Dec 11, 2001 at 13:37 UTC | |
|
Re: Why does this dump core?
by growlf (Pilgrim) on Dec 11, 2001 at 13:54 UTC | |
|
(crazyinsomniac) Re: Why does this dump core?
by crazyinsomniac (Prior) on Dec 11, 2001 at 13:37 UTC | |
|
(Ovid) Re: Why does this dump core?
by Ovid (Cardinal) on Dec 11, 2001 at 21:30 UTC | |
by danger (Priest) on Dec 12, 2001 at 01:25 UTC | |
|
Re: Why does this dump core?
by blakem (Monsignor) on Dec 17, 2001 at 06:09 UTC |