There’s an interprocess communication
mechanism unique to Tk: the
 command. As originally implemented in
send transmits commands (which, in Tcl,
are simply strings) to another Tcl application running on the same
display. The receiving application then executes the commands and
replies with the results. Think of it as an
in the context of the receiver, performed automatically by Tcl/Tk.
Perl/Tk provides a
send command too, but the
default receiver is a simple stub that rejects all incoming
send requests. Fortunately, we can override that
behavior by writing our own receiver. And we’re not constrained
evaling the incoming data, but can do
whatever we please.
send, we can write remote controllers,
client/server applications, parallel programs, and intriguing games.
In this chapter, we’ll see examples of some of these written in
Perl and, in a mind-stretching twist, Tcl.
available on Win32 operating systems. This may change in the