in reply to Problems with array references in shared hash values

I'm not sure about this, but instead of

$RESULTS{ip} = $array_ptr

try:

$RESULTS{ip} = [ @$array_ptr ]

This might be enough to make the array data "shareable" (not tested)

Replies are listed 'Best First'.
Re: Re: Problems with array references in shared hash values
by jv (Initiate) on Jul 04, 2003 at 15:18 UTC
    but rigth there I want to creat the array. Before that the array doesn't exist!
      $RESULTS{ip} = []; push @{$RESULTS{ip}}, $new_data;
        the error is given at this line -->$RESULTS{ip} = [];
        yes,I do ablolutely the same thing but error occurs! Invalid value for shared scalar at jv.pl line 74.
        that's horrible