flow02:/home/tomcat> cat tmp.out 
1.1.1.1
flow02:/home/tomcat> 
flow02:/home/tomcat> 



flow02:/home/tomcat> cat a2.pl 
open (LOG ,"<","tmp.out");  
                    while (<LOG>) {  
                    chomp; 
$var=$_;
$hash{$var}++;
};
while(my($ip, $times) = each %hash) {
                   print "$ip access count(*) ==   $times\n";
};


flow02:/home/tomcat> perl a2.pl 
1.1.1.1 access count(*) ==   1


flow02:/home/tomcat> >tmp.out 
flow02:/home/tomcat> cat tmp.out 
flow02:/home/tomcat> perl a2.pl 
flow02:/home/tomcat>