It's the standard behavior of Perl. use Data::Dump "pp"; %a = qw/x 1 y 1 z 1/; grep { $_ } $a{bob}; pp %a; ^D ("y", 1, "bob", undef, "x", 1, "z", 1)
At 02:18 PM 2/22/2011 +0100, Christian Walde wrote: >On Tue, 22 Feb 2011 13:46:55 +0100, Chris Wagner <wagn...@plebeian.com> wrote: >> At 08:54 PM 2/21/2011 +0100, Christian Walde wrote: >>> use Config; >>> # print 1 if $Config{foo}; # enabling this removes the crash >>> grep { $_ } $Config{bar}; # this crashes >>> >>> These two lines on their own will cause ActivePerl of any version to exit >>> with the error message above. >>Hi. U can't do that because Perl must autovivify $Config{bar} in order to >> have a value to put into $_. HTH. > >Good guess, that's almost what happens. The problem happens a bit deeper in the guts and is actually caused by Exporter.pm, where it tries to do local $_ and by doing so triggers autovivification. (grep/map only do an aliasing of %Config to $_, which is fine.) > >I remembered this morning that there is a bug tracker for ActivePerl, started to write up an error report and in doing so ended up formulating a possible for for ActiveState: http://bugs.activestate.com/show_bug.cgi?id=89447 > >-- >With regards, >Christian Walde >_______________________________________________ >Perl-Win32-Users mailing list >Perl-Win32-Users@listserv.ActiveState.com >To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede malis" 00000100 _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs