It all depends on what exactly you mean by "synchronized." Are you
content to check the last modificatin time, or do you want to
check the files themselves. Either way, perl can handle it. :)
The above code is a good start (although I would store the values of
-M $file1 so that it is not called more than once) and you can
throw in some
read commands to actually compare
the contents. Sounds like a great project for you to try - be sure to
ask perlmonks if you get stuck! (and post it to
Craft when
you are done)