[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] side effect with hash of hashes



"Colbatzky,Dr,Florian ANAS THODE" <Florian.Colbatzky@bc.boehringer-ingelheim.com>
>  # All entries in $rhoh_SelOwner are saved in $rhoh_Owner:
>  foreach $key (%$rhoh_SelOwner) {

That's bad. Using a hash in a list context lists both keys *and* values, that's
what creates the extra entries. Use

foreach $key (keys %$rhoh_SelOwner) {

instead.

Matthias

-- 
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
   "One fine day in my odd past..." -- Pixies, _Planet of Sound_

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch