$VAR2 is "under" $VAR1, it's your Data::Dumper call that's wrong. You need to backslash the hash (to create a hashref):
print Dumper \%books
Apostrophes need to be quoted inside a single-quoted string, otherwise it will be interpreted as being the end of the string.
Update: must use Spelling before writing "apostrophes"
In reply to Re: Hash of Hashes
by FunkyMonk
in thread Hash of Hashes
by ewhitt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |