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.


In reply to Why does this dump core? by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.