This will place results in the %count and %size hashes, keyed by IP address. If "IPaddr:Size" are the keys, just replace the 'values' with 'keys' in the fragment above.map {if /^(.*):(\d*)$/ {$count{$1}++;$size{$1}+=$2;}} values(%hash);
In reply to Re: How do I extract the number of times a value appears in a hash?
by ton
in thread How do I extract the number of times a value appears in a hash?
by v
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |