#!/usr/bin/perl open FILE,"<foo.txt" || die $!; for (;;) { for ($curpos = tell(FILE); $_ = <FILE>; $curpos = tell(FILE)) { ## do something exciting here print; } sleep(1); seek(FILE, $curpos, 0); }
In reply to Re: Simulating UNIX's "tail" in core Perl
by mr.nick
in thread Simulating UNIX's "tail" in core Perl
by gryphon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |