I'm sure I saw this done without the temp var $x once?
my @a = qw[ one two three ]; my $x = 1; $hash = {}, $hash->{ $_ } = $x, $x = $hash for reverse @a; print Dumper $hash; $VAR1 = { 'one' => { 'two' => { 'three' => 1 } } };
In reply to Re: hash problem
by BrowserUk
in thread hash problem
by m.y
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |