I agree, I do find that I almost always need just the keys. I think I just always end up thinking too much about so I come up with something convoluted. It's like my brain turns off when it comes to map and hashes.
BTW, that should be @new_keys = grep, not map
In reply to Re^3: map and grep (but for hashes)
by lostjimmy
in thread map and grep (but for hashes)
by zerohero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |