Run client.pl on your client machine, webserver(B), and it will send a request via the TCP protocol to your daemon waiting on server A.
Note that there are some security concerns with this. Don't let your daemon accept just any list of commands to run on server A. Perhaps sends 'RunA' from client.pl, and your daemon will then go ahead and execute a hardcoded set of commands before sending back the response.
Hope this helps
--
bm