Have a look at this:

#!/usr/bin/perl -w

use threads;
use threads::shared;

my %b : shared = ();

$b{a} = 1;
$b{a}{a} = 1; # works

eval {
    $b{b} = ();
    $b{b}{a} = 1; # fails
};
print $@;

eval {
    $b{c} = undef;
    $b{c}{a} = 1; # fails
};
print $@;


Is this related to autovivification? It seems odd that the first one works
but the others do not.

-Sven

Reply via email to