Thread 1 terminated abnormally: lock can only be used on shared values at UTP.pm line 189 Do you think this is because of the separate package ?? I declare and initialise the hash in MdAgent.pl : ... my %Totals :shared; ... msg("initialising totals"); foreach my $envo(sort keys %{$marketMsgHsh{$plugin}{environments}}) { $DEBUG && msg("sharing $envo"); $Totals{$envo}=&share( {} ); $DEBUG && msg("done."); foreach my $messageType(sort keys %{$marketMsgHsh{$plugin}{messageTypes}}) { $Totals{$envo}{$messageType}=0; } } msg("done."); ...