in reply to Populating hash keys
use Data::Dumper; ## japhy's solution, with a style contribution from Juerd my @keys = qw( this that those ); my $node = \\my %hash; $node = \$$node->{$_} for @keys; $$node = 'value'; print Dumper(\%hash); __output__ $VAR1 = { 'this' => { 'that' => { 'those' => 'value' } } };
_________
broquaint
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Populating hash keys
by dda (Friar) on Oct 03, 2003 at 13:37 UTC | |
by broquaint (Abbot) on Oct 03, 2003 at 14:28 UTC |