Ah, if it's for Windows, then Win32::ChangeNotify should be the answer.
--
I'd like to be able to assign to an luser
| [reply] |
You don't mention what OS you're using, and I don't actually know if this is an OS-dependent issue, but I do know that on any unix-like system, the file size reported by "-s" will reflect the recent growth of a file while it is actively being written to by some other process:
my $path = "dir/file_to_watch";
my $prev_size = -s $path;
while (1) {
sleep 5;
my $size_now = -s $path;
if ( $size_now > $prev_size ){
print "file grew as of ".scalar localtime().$/;
$prev_size = $size_now;
}
}
| [reply] [d/l] |
I should have mentioned that this is for Win32
| [reply] |
I think you may be after the content of perldoc -q tail, which explictly also points to File::Tail, a module you may be interested in.
| [reply] |
| [reply] |