in reply to Re^2: Count non-empty hash values
in thread Count non-empty hash values
Great answers fishbot_v2 and Joost.
I figured out what threw me: In perldoc -f grep the code examples all use regex. I was mistaken when I thought grep just did the equivalent of "$_ =~ /myregex/". It does more than that. Even Programming Perl examples are of the regex type. For any future readers, I found a better example of the inequality usage (and some others) in Perl Cookbook, recipie 4.13.
Also, kudos to Joost for using values(). I'm so used to calling by key with the arrow operator, that I comletely forgot that such a function existed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Count non-empty hash values
by Joost (Canon) on Oct 23, 2005 at 00:46 UTC |