in reply to redudent hash

Your RE '.*?' is a little suspect. What is intended?

You can use a grep to replace each foreach loop, for example:
my @keys = grep /.*?\.oracle.*?$/, keys %$HR_Cwnt; delete @$HR_Cwnt{@keys};
You don't actually need the @keys array, but it makes the code easier to read.
Update: corrections to wording

Replies are listed 'Best First'.
Re^2: redudent hash
by markkawika (Monk) on Jun 22, 2009 at 16:53 UTC
    Yeah, the two occurrances of .*? in that regex don't seem to do anything useful. The only thing I can see is that you want to see (for example) whether the string .oracle appears in $id. If that's the case, a simple grep /\.oracle/, $keys %$HR_Cwnt; would be faster.