Re: sorting a hash / 2008-06-01
- From: "A. Sinan Unur" <1usa@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 May 2008 13:51:51 GMT
Gunnar Hjalmarsson <noreply@xxxxxxxxx> wrote in news:6aacqtF36ku0jU1
@mid.individual.net:
dn.perl@xxxxxxxxx wrote:
....
The problem is that
the city-names are one extra level deep with the state-name coming
in-between. I wondered whether I should build the hash differently.
Probably. This is one idea:
my %hash = (
'San Jose' => {
state => 'Calif',
max_temp => 84,
},
'San Fran' => {
state => 'Calif',
max_temp => 94,
},
);
http://en.wikipedia.org/wiki/Athens_(town),_New_York
http://en.wikipedia.org/wiki/Athens,_Georgia
Sinan
--
A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
.
- References:
- sorting a hash / 2008-06-01
- From: dn.perl@xxxxxxxxx
- Re: sorting a hash / 2008-06-01
- From: Gunnar Hjalmarsson
- sorting a hash / 2008-06-01
- Prev by Date: Re: FAQ 5.12 How can I open a filehandle to a string?
- Next by Date: Re: Can't locate object method is_initial_req
- Previous by thread: Re: sorting a hash / 2008-06-01
- Next by thread: OT: SI units (was sorting a hash / 2008-06-01)
- Index(es):