in reply to Question about - M
Note that -M returns the age (in days) of the file since the program started so if you plan on using an infinitly looping script, you might want to set $^T to time...
$^T = time; to make sure -M returns the true age of the file. $^T contains the date/time when the script was started ad -M uses it to find the age in days.If your script has been running 10 days, and the file itself has been edited last 5 days before you started the script, normally -M would return 5.xxxxxx (minutes, seconds, etc) and not 15.xxxxxx. With that $^T, it would be 15.xxxxx
Update: Oki, this can look confusing... rephrased a bit
Greetz
Beatnik
...Perl is like sex: if you're doing it wrong, there's no fun to it.