in reply to references - proper use of infix (arrow) and deprecated hash references

In addition to what the others have already said, some good links might be perlreftut and perldsc (the latter contains a section "hashes of arrays" which is what you've got).

I just wanted to add a few more notes: You should always Use strict and warnings as this will help avoid some errors. Also, open READ, $file || die is probably not what you want: it is interpreted as open(READ, ($file || die())); (that is, throw an error when $file has a false value) instead of open(READ, $file) || die; (throw an error when open returns a false value). The reason is that || has a higher precedence (perlop). It's common to use the lower-precedence or instead, i.e. open READ, $file or die, which will work correctly. Also, nowadays lexical filehandles and the three-argument form of open are recommended, that is open my $readfh, '<', $file or die ...; Lastly, note that keys will return the keys of the hash in a random order, so if you used foreach (sort keys %hash), they'd be returned in a consistent order across runs of the program.