in reply to query on hash understanding

Please use code tags to be readable.

See perldsc for a description of nested data structures like hashes of hashes.

There you'll learn about the meaning of dereferencing operator -> which can be dropped between parens like }{ .

See also perlref

x||0 (ie x or 0) just means return 0 if LHS x is false.

HTH! :)

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)