|go ahead... be a heretic|
Re: adding a new hash in an arrayby matija (Priest)
|on Jul 14, 2004 at 16:40 UTC||Need Help??|
Ouch, your code is a MESS! The only thing that could make it look uglier is a couple of gotos.
Your basic problem is that you are running without use strict; with it, you would realize that the code
does not do what you think it does.
You need to put the my outside of the loop, and instead of simply assigning new values to the hash, you need to make sure each row gets it's own anonymous hash.
The way I usualy do it looks somewhat like this:
Actually, I usualy fill in the values right when I allocate the anonymous hash, but that couldn't be translated into what you need as easily.