http://www.perlmonks.org?node_id=1168772


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.
my %users; foreach my $line (<$file>) { my ($email, $ip) = parse_line($line); $users{$email}{$ip}++; }
Then you'll have a hash that looks something like:
%users = ( 'joe@example.com' => { '192.168.10.24' => 2, '192.168.10.28' => 1 } );