Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Occassionally, they need to be called by their ID. Other times, by their name. Here is how I have it right now:
When I want to call someone's third variable, and I've got their name, it gets a bit clumsy.$PEOPLE{$idnumber} = [$name, $var1, $var2, $var3, $etc]; $NAMES{$name} = $idnumber;
Is there a better way around this? There has got to be an easier way.. Thanks.$PEOPLE{$NAMES{$name}}[2]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Complex Data Structures?
by Adam (Vicar) on Dec 21, 2000 at 03:25 UTC | |
|
(Ovid) Re: Complex Data Structures?
by Ovid (Cardinal) on Dec 21, 2000 at 03:27 UTC | |
by myocom (Deacon) on Dec 21, 2000 at 03:44 UTC | |
by Anonymous Monk on Dec 21, 2000 at 03:52 UTC | |
by Ovid (Cardinal) on Dec 21, 2000 at 04:01 UTC | |
|
Re: Complex Data Structures?
by chipmunk (Parson) on Dec 21, 2000 at 03:28 UTC | |
|
(tye)Re: Complex Data Structures?
by tye (Sage) on Dec 21, 2000 at 22:58 UTC | |
|
Re: Complex Data Structures? (A different view)
by extremely (Priest) on Dec 21, 2000 at 16:24 UTC |