- or download this
lock(%cfg::thash);
$v1="A";
$v2="1";
$cfg::thash{$v1}{$v2} ="b";
- or download this
$cfg::thash{$v1}{$v2} ="b";
- or download this
## Make the value of key 'A' an anonymous hash.
$cfg::thash{A} = {};
## add a key '1' to that anonymous hash with the value "b";
$cfg::thash{A}{1} = "b";
- or download this
use strict;
use threads;
...
share( $temp ); ## share() the temp var
$thash{A} = $temp; ## assign it into the structure
$thash{A}{1} = 'b'; ## At this point you have what you asked for.