# could do stat()[9] and not use File::stat use File::stat qw(:FIELDS); $cfgfile = '/my/config/variables.file'; stat($cfgfile) or die "No $cfgfile: $!"; my $last_mtime = $st_mtime; parse_config($cfgfile); #time passes #enter loop of things to do and events to check stat($cfgfile) or die "No $cfgfile: $!"; if ($last_mtime != $st_mtime) { $last_mtime = $st_mtime; parse_config($cfgfile); } # sleep(N) unless something else to do
Dingus
In reply to Re: How can I alert perl to a file write
by dingus
in thread How can I alert perl to a file write
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |