Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have many 3 item groupings (i.e. US,USA,USD) and
I'd like to maintain a data structure in which given one I can easily write small functions to convert between the other two. I have been playing around with a few data structures, mainly:
andmy %countryMap = ( US => [USA,USD],...);
with these data structures, I can't seem to figure out a way to convert from USA to US and USD to US. can anyone help? thanks.my $countryMap = { US => {country=>USA, currrency=>USD}, ... };
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: data structure problem
by Zaxo (Archbishop) on Jun 06, 2002 at 21:45 UTC | |
Re: data structure problem
by Anonymous Monk on Jun 06, 2002 at 20:59 UTC | |
Re: data structure problem
by jwest (Friar) on Jun 06, 2002 at 21:03 UTC | |
Re: data structure problem
by George_Sherston (Vicar) on Jun 06, 2002 at 22:07 UTC | |
Re: data structure problem
by Stegalex (Chaplain) on Jun 06, 2002 at 23:22 UTC | |
Re: data structure problem
by Abigail-II (Bishop) on Jun 07, 2002 at 11:58 UTC | |
Re: data structure problem
by robobunny (Friar) on Jun 06, 2002 at 21:01 UTC |
Back to
Seekers of Perl Wisdom