in reply to Re: setting hash keys by array
in thread setting hash keys by array
$node = \$$node->{$keys[$i++]} while $i < @keys;
++. IMHO, this is the only sane approach. But why not $node = \$$node->{$_} for @keys;?
Update
Reputation: 41, it says. MADNESS. I only suggested the use of for LIST instead of explicitly using an index variable. It's a style related comment. Why on earth did you people upvote this THIS MUCH? There are better nodes getting lower scores. Vote for those. ++ japhy, ++ demerphq for they did the work. I only complained about style.
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: setting hash keys by array
by demerphq (Chancellor) on Sep 09, 2002 at 18:20 UTC | |
|
Re: Re: Re: setting hash keys by array
by fruiture (Curate) on Sep 09, 2002 at 17:55 UTC | |
|
Re: Re: Re: setting hash keys by array
by japhy (Canon) on Sep 09, 2002 at 17:21 UTC |