in reply to triggering a program in web server

So, what service do you use on server B? If you really need this convoluted scheme, why not use http to upload the file on server B, the same way it was uploaded to server A? LWP will help you to do this.

Abigail