http://qs321.pair.com?node_id=524164

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.
my %replacehash; $replacehash{TEMP1} = "contains TEMP1"; $replacehash{TEMP2} = "contains TEMP2"; $replacehash{TEMP3} = "contains TEMP3"; $replacehash{TEMP4} = "contains TEMP4"; ....
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.