in reply to Invalid value for shared scalar -while assigning object value to array - In Threads

There's discussion of this e.g. in Threading: Invalid value for shared scalar. The executive summary appears to be that you cannot share nested structures this way - structures such as an array containing not simple scalars, but references to more complex structures, e.g. Net::Telnet objects.

In that same (Perlmonks) thread djantzen also points to How to share huge data structure between threads? for sample code for how to share nested structures.

  • Comment on Re: Invalid value for shared scalar -while assigning object value to array - In Threads

Replies are listed 'Best First'.
Re^2: Invalid value for shared scalar -while assigning object value to array - In Threads
by gjoshi (Sexton) on Oct 16, 2015 at 09:49 UTC
    I looked at it but I did not get it how to do that. that's why I have asked this question. If anyone has example then it would be useful for me. thanks --girija
      Try shared_clone