in reply to Piping Tail and while loops

Why open in a pipe at all? something like this basicly implements tail in perl:
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 }