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}, ... };
Back to
Seekers of Perl Wisdom