in reply to Multiple values per key in a hash

The previous comments answer your question technically, and point you at the documentation that explains how to do what you're trying to do. However, I'd just like to point out that there are two features of Perl that are the foundation of complex data structures; you need to learn and understand these well:

  1. References - these are much like C++ references. They are essentially immutable pointers.
  2. Anonymous arrays and hashes - In particular, watch that you don't confuse a list to initialize a named array or hash with an anonymous array or hash. The difference is in the enclosing punctuation. Make sure you get that clear, and try to use a font that distinguishes parens from braces clearly.

It also helps to draw a picture at the start, and use Data::Dumper after that.

Edit: fixed grammar in 1st para.


sas