in reply to Reopen file when contents changed?
Incidentally under *NIX there's not strictly speaking anything like "text mode".
Update: I didn't want to test this myself, but in the end I did and it seems to work just fine:
#!/usr/bin/perl use strict; use warnings; open my $fh, '<', '/proc/stat' or die $!; { print scalar <$fh>; seek $fh, 0, 0; sleep 1; redo; } __END__
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reopen file when contents changed?
by dReKurCe (Scribe) on Jun 07, 2005 at 21:15 UTC |