in reply to syntax of multidimensional arrays and hashes

your code/intention is very hard to understand, even when knowing your former question in hash of arrays to array of arrays. Especially $thread[$i] confuses me, where does this array come from?

You should better stay in that former thread and continue to evolve code on the base of the answers you got, so we can understand what you really want.

And you should better have a look into the docs for data structures perldsc

Cheers Rolf

Replies are listed 'Best First'.
Re^2: syntax of multidimensional arrays and hashes
by AnomalousMonk (Archbishop) on Jul 18, 2009 at 06:19 UTC
Re^2: syntax of multidimensional arrays and hashes
by hsfrey (Beadle) on Jul 19, 2009 at 04:26 UTC
    Rolf: I showed where that came from in the post of a few days ago where I posted the entire program. I have a hash, %threads. The key is a string $thread, and the value is an array of numbers. This is how I printed the hash after it was constructed: foreach $thread (keys %threads) { print "$thread: @{$threads{$thread}}\n";} And that worked properly, exactly as expected. The code I posted here was an attempt to transfer the end arrays from members of the hash to members of an array. I initially tried to transfer each array as a whole. That gave me the problems I described in the previous post. The answers I got then didn't help, so I thought I'd try to do less cleverly, and transfer the elements of the array rather than the whole array. That's where the index $i comes from.