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"})); }
In reply to Re^3: Printing only the "keys that have a value" in hash
by aquarium
in thread Printing only the "keys that have a value" in hash
by iphone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |