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]
- Re: Fork (not... Chas Owens
- Re: Fork ... Pierre Smolarek
- Re: Fork ... Pierre Smolarek
- Re: F... Chas Owens
- Re: Fork (not... Peter Scott
- Re: Hash of arrays Brett W. McCoy
- RE: Hash of arrays mark crowe (JIC)
- Hash of arrays Diego Riaņo
- Re: Hash of array... Troy Denkinger
- hash of arrays Tyler Cruickshank
- Re: hash of arrays Nicole Seitz
- Re: hash of array... Rob Dixon
- Re: hash of array... John W. Krahn
- RE: hash of arrays Wagner, David --- Senior Programmer Analyst --- WGO
- hash of arrays Phillip E. Thomas
- Re: hash of array... James Edward Gray II
- Re: hash of a... Phillip E. Thomas
- RE: hash of arrays Dan Muey