hi there!

I've got a problem with a complex data structure and hope you can help me.

I know that I can't have a hash whose values are arrays. So I tried to build a hash of references to arrays.

I guess I've made some mistakes .

This is what my hash looks like:

%myHash = ();
# lots of code here
$myHash{"245"} = [[$len245oa,$pos,$tag245oa]];
#some code here

$myHash{"856"} = [[$len856_41,$pos,$tag856_41]];
#some code here
#now I have to add a new element(which is also an array) to the outer anonymous array
#Is the following correct?
$myHash{"856"}[1] = [$len856_42,$pos,$tag856_42];


#Then I'd like to iterate over the array of sorted hash keys(no problem)

@sortedKeys = sort keys %myHash;
foreach $key (@sortedKeys) {
# now I have to change the value of each second element of the inner arrays($myHash{$key} [$index][1] ???)
#Unfortunately, I don't know how to do this. I guess, first, I need another loop.But then how to access the second element and overwrite it???


Many thanx in advance.


Nicole




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to