in reply to Re^2: Printing only the "keys that have a value" in hash
in thread Printing only the "keys that have a value" in hash
that will get rid of empty keys--assuming you're not interested in these--and henceforth you can now iterate over keys of the hash.foreach $key(%my_hash) { delete $my_hash{"$key"} if(!exists($my_hash{"$key"})); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Printing only the "keys that have a value" in hash
by lostjimmy (Chaplain) on Nov 01, 2010 at 02:48 UTC | |
|
Re^4: Printing only the "keys that have a value" in hash
by iphone (Beadle) on Nov 01, 2010 at 02:41 UTC |