Syntactic Confectionery Delight | |
PerlMonks |
Re: Seeking a better way to monitor a file's changeby alexbio (Monk) |
on Jun 26, 2010 at 11:35 UTC ( [id://846666]=note: print w/replies, xml ) | Need Help?? |
An easier way to do so could be using the AnyEvent module. In the AnyEvent::Intro there is an example that does something very similar to what you are trying to do. See the Introduction to Event-Based Programming section (instead of using STDIN you can obviously use any file handle you want). It has been implemented in the AnyEvent::Filesys::Notify module. Just my 2¢.
Alex's Log - http://alexlog.co.cc
In Section
Seekers of Perl Wisdom
|
|