Based on your initial post, I assume you are already comfortable with file I/O. In order to generate your volume hash, you just need to start by putting an anonymous array in each hash entry and then populate it with a series of
pushes. There are some reasonable examples in
perllol.