You don't need this part , delete it, and it should just work
# New site $h{'siteA'} = {'09-10-2011' => 1};
Its called autovivification, it means if you use it like a hash ref it magically becomes a hashref.
See References quick reference, autovivification, perlglossary#autovivification, autovivification
In reply to Re: Adding to a hash reference
by Anonymous Monk
in thread Adding to a hash reference
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |