There's a bug in my code. You seem to imply the bug is simply my choice of array name. I disagree. If that's the bug, we have redundant code ($HoH{$_}{user}). And simply put, it makes no sense to end up with a bunch of IP addresses when looking for unique users.
My code should have been
my %seen; my @unique_users = grep !$seen{$_}++, map $HoH{$_}{user}, keys(%HOH);
In reply to Re^2: Retrieve unique values from Hash of Hashes
by ikegami
in thread Retrieve unique values from Hash of Hashes
by snra_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |