I'm sure there's a module in CPAN that could help you do this. Try searching here.
Or to go the stubborn route (or if this is homework ;) - I suggest looking into using nested datastructures such as arrays of arrays and so on, as suggested previously, which can be found here.
-------------- It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs
I found this module that is suposed to make "hashes" with duplicated keys... I think its CDB_File and related, but this is the "easy way", which nothing else work I can always use. I think I'll try the hard way, so i can learn something more for future problems with data manipulation, that for sure i'll have since Im a theoretian and work with simulations. Now I now in which direction to go(perhaps into more problems...Ha!!). Thanks again