I have a program in Perl I'm working on where I would need multiple keys, and a way of giving each key multiple values and follow that by being able to both read them in and write them out to an external file depending on if the key matches what the person enters into standard input. I've looked across several sites and have found information somewhat useful in reading in hashes of arrays, but not writing them out, and I would also need to be able able to add to the array in the external file.
Is this possible?
Edit: Is there a way that it could be done with starter Perl? I'm a beginner. Hashes of arrays seemed like the best way to make it work, but what I really need is a way to show multiple values for the same key while only showing the key once.