in reply to Idea to program watchdog
THough not Perl, you might find Tripwire useful for this kind of monitoring.
/J\