in reply to Simulating UNIX's "tail" in core Perl
#!/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); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Simulating UNIX's "tail" in core Perl
by gryphon (Abbot) on Mar 07, 2001 at 21:45 UTC | |
by tye (Sage) on Mar 08, 2001 at 01:01 UTC |