![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
The keys corresponding to 9-13 were repeated later in your $line, which resulted in an overwrite of the values corresponding to those keys.
For example, from the first set of print statements, position 9 corresponds to "POSITION NAME", which would look something like:
A little further in your list you'll see "POSITION NAME" at position fifteen; the assignment statement for this would look something like Since this statement is executed after the first, your 9 disappears, and only 15 is stored as the value for the key of "POSITION NAME". Repeat the above for entries 10-13, and you should see those values got overwritten. If you want to keep all this data, you might consider making the integers your keys, and saving the text as the values. Of course, you already did that when you created the @data array. hth. -hershmaster In reply to Re: hash and array mismatch
by Anonymous Monk
|
|