in reply to how to create shared hashes of arrays
I would try doing it in a sample script first. without threads.. to make sure you are constructing the Data struct correctly.
Firstly, your concept of an HoA is a little off. The hash doesn't contain an array.. the hash keys.. hash to array references as their value. for example:this should print something likemy $test = [1,2,3,4]; my %test = (array => $test); print $test{array}
So to print an element of that array you would doARRAY(0x2251e4)
Take a look at Perl Data Structures Cookbook @ perldoc.comprint $test{array}->[0];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to create shared hashes of arrays
by sumit_nagpal (Initiate) on Jul 09, 2004 at 13:19 UTC | |
by sumit_nagpal (Initiate) on Jul 09, 2004 at 13:35 UTC | |
by Grygonos (Chaplain) on Jul 09, 2004 at 13:35 UTC | |
by sumit_nagpal (Initiate) on Jul 09, 2004 at 13:43 UTC |