See also, File::ChangeNotify and inotify.
In reply to Re: how can i detect updates to running code? by Your Mother in thread how can i detect updates to running code? by dkg