Hi Solli,

I've never used threads, but I posted a message a short while ago about copying
multi-dimensional hashes.  %Inventory will hold the reference locations of
%Test, not the values ;

try:

use FreezeThaw qw/freeze thaw/;
my $frozen = freeze %Test ;
%Inventory = thaw $frozen ;

HL


--- Solli Moreria Honorio <[EMAIL PROTECTED]> wrote:
> 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
> 

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

Reply via email to