push @s, &share( { $cmd => time } }; ## The & before share() is important here; and one of the few times you should ever use it.
## or
push @s, &share_clone( { $cmd => time } };
## or
my %hash : shared = ( $cmd => time() );
push @s, \%hash;
####
my @array : shared;
$array[ 0 ] = 'fred'; ## ok
$array[ 1 ] = 12345; ## ok
$array[ 2 ] = [ 1,2,3 ] ## NOT OK
$array[ 2 ] = &share( [ 1,2,3 ] ); ## OK
$array[ 3 ] = { 'a'..'z' }; ## NOT OK
my %hash : shared = ( 'a' .. 'z' );
$array[ 3 ] = \%hash; ## OK
####
$World = {
Players => [
"player1" => { # each key is a player id
ID=>"player1", HP=>9999, MP=>2000, coX=>0, coY=>0,
Equip => [ qw/xxxSword yyyShield/ ],
Magic => [ qw/Earthquake/ ],
Invent => { Cure => 1, Poison => 3 }
},
"playerx" => { ... }
],
Monsters=>{
MonsterA => [
"coX1-coY1", "coX2-coY2", ...
]
MonsterB => [
"coX1-coY1", "coX2-coY2", ...
]
}
};