in reply to Socket or not

Other possibilities would be ... Windows remote access ... setting up a web-server-type program ... using a shared file that someone on another computer can write into ... using named pipes with a little slave-program that’s always running, listening to it.

Regardless of those “possibilities,” you can be almost 100% certain that what you are considering doing, has already been done before.   You shouldn’t even have to use Perl.   Do some “Googling” to look at the existing body of work that should be available.

For example, Googling “Windows remote execution” talks about things like rexec, rsh, and even one article (on page one) titled, “DoIt:   Yet Another Remote-Execution Daemon for Windows.”   I have not examined any of these programs; nor do I intend to.

The fastest way to do anything, is to find a way not to have to do it at all.   To reduce your problem into a problem that is already-solved.   To a program that has already been written (even if you pay for it).