in reply to Brain muchly befuddled by nested hashes
'$day'Variables don't interpolate in single quotes. That should be "$day", or better, just $day.
$ClubTotal{ 'DayOfMonth'=> $date }What are the keys of the outermost hash supposed to be? That may not do what you intend. When you provide a list when referencing a hash element, perl assumes you are using old perl4-style emulated nested hashes and produces a single hash key like this: $ClubTotal{"DayOfMonth$;$date"}. See $;.
Data::Dumper produces:Sadly, Data::Dumper doesn't have the best defaults, so it is producing literal \034 characters in the output there. Always setting $Data::Dumper::Useqq=1 when examining your data can be helpful.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Brain muchly befuddled by nested hashes
by graff (Chancellor) on Nov 24, 2008 at 05:30 UTC | |
by ysth (Canon) on Nov 24, 2008 at 06:05 UTC |