in reply to Piping Tail and while loops
open (TAIL, "logfile.log"); seek (TAIL, 0, 2); # check the manpage for (;;) { sleep 1; # so we don't hog cpu if (seek(TAIL,0,1)) { while (<TAIL>) { # code to act on logfile here } } # execution continues here }
|
|---|