use strict; use POSIX; use Data::Dumper; my %ips; my %hash; my @sorted; my $num=0; open(ALERCE, "< alerce"); while () # While input is wrong... { if($_ =~ /^MSG/) { my @log = split(/\t/, $_); my $ip; my $spam; $ip=$log[8]; $spam=floor($log[10]); # if($spam >= 5) # { # print "$ip\t$spam\n"; push(my @puntaje, $spam); $ips{$ip}= \@puntaje; # } } } print Dumper(%ips); #while ((my $key, my @value) = each(%ips)){ # print "$key"; #foreach my $i (@value){ #print "$i\n"; #} #} close(ALERCE);