in reply to Re: share array of hashes between main program and thread
in thread share array of hashes between main program and thread
for example, i create my array of hashes (in a thread) and then send the array of hashes reference to an additional function. Then i tried (in the new function)push( @{$Array_ref} , \%hash );
once i tired to call the new hash (in line i) $Array[$i]{'foo'} i got an error massage of uninitialized value. I can think of the reason why it is like that and that is since my new hash i am trying to add is not "shared"... but i dont know how to add a single shared hash to $Array$i. thanks@Array = @$Array_ref; $Array[$i]{'foo'}->$boo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: share array of hashes between main program and thread
by BrowserUk (Patriarch) on Nov 11, 2009 at 07:51 UTC | |
by Adler (Novice) on Nov 11, 2009 at 11:54 UTC | |
by BrowserUk (Patriarch) on Nov 11, 2009 at 12:01 UTC |