Greetings all,
Aside from suggesting Data::Dumper or Dumpvalue for complex data-structure investigations I think a read up on perldsc would be worthwhile.
However my short answer is to make sure that $key contains something prior to the assignment.
-InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo