Hi, I’m getting a strange error 'Invalid value for shared scalar' when I try do run one code like below:

use threads;
use threads::shared;
 
my %Inventory;
my %Test;
 
share ( %Inventory );
 
$Test{0}{0} = 1;
$Test{0}{1} = 1;
$Test{1}{0} = 1;
$Test{1}{1} = 1;
 
%Inventory = %Test;

 

If I remove the share function, it's running well, but I need to use the hash shared on threads and I don't figure out why this happen.

Thanks

Solli Moreira Honorio
Sao Paulo - Brazil

 

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to