in reply to Perl script for syncing files

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)

Replies are listed 'Best First'.
RE: Re: Perl script for syncing files
by buzzcutbuddha (Chaplain) on May 17, 2000 at 20:59 UTC
    You're right, I should have stored the -M $file1; in a var. I was just
    trying to bang that out fast as an example...should have thought of that
    though. ooops!