in reply to Printing Hash of Arrays

There are better ways to clean this up (as already pointed out) but generally it is a good idea to avoid explicit C style loops. For instance instead of:
for ($i=1 ;$i<=$number ; $i++) { ... }
you can write:
foreach $i (1..$count) { ... }
which executes faster, and tends to result in less chance of fencepost errors. And of course I would never write a loop like that, I would instead do:
foreach my $i (1..$count) { ... }
which plays better with strict. (Which it doesn't look like you are using, but is a very helpful habit to get into.)