hotshot has asked for the wisdom of the Perl Monks concerning the following question:
I miss the continue (the ... in the loop) in order to insert the pointer to one big hash, in order to get for the following array:my %hash; for (@bigArray) { @tmp = split(\\+/); # split by '+' $node = 'value'; $node = {$_=>$node} foreach reverse @keys; .... }
this hash:my @bigArray = qw(brown red+green blue+yellow black red+white purple+o +range+gray);
Anyone can help me with that?%hash = ( brown => 1, red => ( green => 1, white => 1, ), blue => ( yellow => 1, ), black => 1, purple => ( orange => ( gray => 1, ), ), );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash tree
by Aristotle (Chancellor) on Sep 10, 2002 at 13:46 UTC | |
|
Re: hash tree
by japhy (Canon) on Sep 10, 2002 at 15:07 UTC |