Hi All, I have used the following code to calculate from log files,
#!/usr/bin/perl use strict; use warnings; use File::Tail; my $file=File::Tail->new("/log/path"); my $line= undef; while (defined($line=$file->read)) { my ($time,$lport,$ip,$stats,$rport) = split; print "$ip/n"; } The log files is updated .. but it doesn't printed .. The sample log file lines are, 1176369096.111 468 172.16.2.80 TCP_MISS/200 9629 1176378643.614 458 172.16.2.80 TCP_MISS/200 9626 1176378681.984 662 172.16.2.75 TCP_MISS/200 9626 Could u help me to find soln??? Thanks, Siva