in reply to How to parse a file with emails and IP's and output a sorted list with a total count
Then you'll have a hash that looks something like:my %users; foreach my $line (<$file>) { my ($email, $ip) = parse_line($line); $users{$email}{$ip}++; }
%users = ( 'joe@example.com' => { '192.168.10.24' => 2, '192.168.10.28' => 1 } );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to parse a file with emails and IP's and output a sorted list with a total count
by mitzyc (Initiate) on Jul 28, 2016 at 23:21 UTC |