in reply to Re: onchange - a script to run a command when a file changes
in thread onchange - a script to run a command when a file changes
This code appears to run the same command on the same file for each updated file in @ARGV[1..$#ARGV].
Well, it doesn't run a command "on the same file" exactly. It just runs a command. I agree it would be more useful if it could somehow supply the filename of the changed file to the command. I can't seem to find it right now, but I had something that did just that. I used File::Signature to watch the file (which was probably overkill.)
I'd be inclined to do this with make, either called from perl or in a frequent cron job.
By default, he is checking for changes every half a second. Cron wouldn't make a good substitute for that.
-sauoq "My two cents aren't worth a dime.";
|
---|