Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi ,
I am storing huge number of variables in a hash.
where TEMP1,TEMP2,... are variables and the values are got using API's.but over here i have used some junk data. Is there elegant way of handling this ? instead of assigning each key with a value,i mean something like "foreach" loop? Thanks.my %replacehash; $replacehash{TEMP1} = "contains TEMP1"; $replacehash{TEMP2} = "contains TEMP2"; $replacehash{TEMP3} = "contains TEMP3"; $replacehash{TEMP4} = "contains TEMP4"; ....
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: elegant way of handling hash?
by g0n (Priest) on Jan 19, 2006 at 10:22 UTC | |
Re: elegant way of handling hash?
by dorward (Curate) on Jan 19, 2006 at 09:38 UTC | |
by Anonymous Monk on Jan 19, 2006 at 10:01 UTC | |
by BrowserUk (Patriarch) on Jan 19, 2006 at 10:19 UTC | |
by Roy Johnson (Monsignor) on Jan 19, 2006 at 15:32 UTC | |
by ambrus (Abbot) on Jan 19, 2006 at 16:47 UTC | |
Re: elegant way of handling hash?
by blazar (Canon) on Jan 19, 2006 at 09:51 UTC | |
Re: elegant way of handling hash?
by Anonymous Monk on Jan 19, 2006 at 09:52 UTC | |
Re: elegant way of handling hash?
by mojotoad (Monsignor) on Jan 19, 2006 at 10:44 UTC |
Back to
Seekers of Perl Wisdom