tanuja has asked for the wisdom of the Perl Monks concerning the following question:
I create the ahsh in the following manner.
and this print the occurences of such multiple keys. now given a new entry (k1,k2,k3) i want to map it into the hash . how do i do it. i wnat tp know the frequency of k1,k2,k3 . how do i doit. if you can suggest me any other method. It will be of real help to me.%hashlist =(); foreach key1,key2,key3 do $hashlist->{key1,key2,key3}++; and to list the occurences of such a hash i do, foreach $key(keys %hashlist) { ($dim1,$dim2,$dim3) = (split %;, $key)[0,1,2]; print "$hashlist->{dim0} "; }
Thanks.
Tanuja.
edited: Sun Sep 21 00:01:46 2003 by jeffa - code tags, formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to create multiple keys in a hash
by thinker (Parson) on Sep 20, 2003 at 23:06 UTC | |
by tanuja (Initiate) on Sep 20, 2003 at 23:32 UTC | |
by Anonymous Monk on Sep 20, 2003 at 23:40 UTC | |
|
Re: How to create multiple keys in a hash
by artist (Parson) on Sep 20, 2003 at 23:58 UTC | |
by tanuja (Initiate) on Sep 21, 2003 at 00:51 UTC | |
|
Re: How to create multiple keys in a hash
by bl0rf (Pilgrim) on Sep 21, 2003 at 00:31 UTC | |
|
Re: How to create multiple keys in a hash
by jonadab (Parson) on Sep 21, 2003 at 00:16 UTC | |
by tanuja (Initiate) on Sep 21, 2003 at 00:47 UTC | |
by jonadab (Parson) on Sep 21, 2003 at 01:22 UTC |