Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
What I need to do is have the default-id point to the attr-name for a mtype I pass in unless a mtype is specified, and in that case I need to have that mtype point to the attr-id specified. (i.e)<attr-name>model_name</attr-name> <alternate> <mtype>0x234567</mtype> <attr-id>0x654321</attr-id> </alternate> <default-id>0x654321</default-id> <attr-name>security_string</attr-name> <alternate> <mtype></mtype> <attr-id></attr-id> </alternate> <default-id>0x123456</default-id>
for security_string I pass in mtype 0x23456 so it uses the default-id of 0x10009 but in the case of model name it should use the attr-id of 0x654321.
Any suggestions for a data structure or alogorithm to use?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Data structure advice needed
by CombatSquirrel (Hermit) on Nov 18, 2003 at 13:27 UTC | |
|
Re: Data structure advice needed
by eric256 (Parson) on Nov 18, 2003 at 14:42 UTC | |
|
Re: Data structure advice needed
by Art_XIV (Hermit) on Nov 18, 2003 at 13:55 UTC |