in reply to How to parse a file with emails and IP's and output a sorted list with a total count
I'm not sure why you are trying XML::Simple as there doesn't seem to be any XML involved.
For data storage, you seem to need a hash of hashes. I'll assume you can get the IP and email address from the file.
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 |
In Section
Seekers of Perl Wisdom