in reply to diff function

You might want to take a look at the unix command rsync. If you don't have it on your system already and you are on Debian, run the command apt-get install rsync to download and install it. It has a ton of options, and can copy files both local to local and local to remote. It can be used either for synchronizing directories or for plain old copies.

I'm assuming you are on *nix, but for readers who have a similar problem and are on MSWin, rsync is also part of the bundle of tools available with cygwin. I think cygwin users need to run setup.exe and select it - I don't think its in the base set of tools that is installed automatically. I think there are also pure MSWin versions as well - search the internet if you happen to be on MsWin.

If rsync interests you, you might want to take a look at some of the Perl oriented rsync modules:

Best, beth

Update: fixed link to man page.