my $count = 0; my $line; # from their POD use File::Tail; # "tail => -1" will start from the beginning of the file my $file=File::Tail->new(name => "/some/log/file", tail => -1); while (defined($line=$file->read)) { print ++$count, " ", $line; }
In reply to Re: tail -f foo.bar | cat -n
by svenXY
in thread tail -f foo.bar | cat -n
by ProfessorHaroldHill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |