lock @s; push @s, &share( { $cmd => time() } ); ... lock %{ $s[ 9 ] }; $s[ 9 ]{ $cmd } = $newtime;