Crucial to "[How Tcl is special]" is the pipeline. Through the syntax set channel [open |$external_command r+] Tcl [open]s an external process, and connects to the [stdin] and [stdout] of $external_command. A special syntax is needed in external_command to get [stderr] to be concantenated to stdout. Reading and writing to stdin and stdout are with the usual Tcl I/O commands: [gets], [puts], and [read]. (It may be necessary to [flush] resp. ''fflush'' to prevent deadlocks caused by buffering). This makes for exceptionally handy [glue] for many situations. ---- Many Wiki pages and other references obliquely discuss or illustrate Tcl process pipelines. While the construction is crucial to a proper understanding of Tcl's capabilities, many newcomers take quite a while to come across an explanation that "gets through" to them. Among the pertinent available writings are * "[Concepts of Architectural Design for Tcl Applications]" * "Scripted wrappers for legacy applications", a series of articles from ITworld, which appears to be gone. Temporarily at least, check out google's cached version at [http://www.google.com/search?q=cache:qasxiAR1z-4C:www.itworld.com/AppDev/4061/swol-1218-regex/+%22scripted+wrappers+for+legacy+applications%22&hl=en&ie=UTF-8] and part 2 of the series at [http://www.google.com/search?q=cache:nG2xX4cRxZoC:www.itworld.com/AppDev/4061/swol-0105-regex/+%22scripted+wrappers+for+legacy+applications%22&hl=en&ie=UTF-8]. * "[client/server with fileevent]" * [Pipe servers in C from Tcl] * [VFS, exec and command pipelines] * ... ---- This transcript of an interaction session illustrates a simple pipeline with Unix's bc executable: % set channel [open |bc r+] file3 % puts $channel "1234567890 * 987654321" % flush $channel % puts [gets $channel] 1219326311126352690 ---- [[Give example of Win* pipeline.]] ---- While (classic) MacOS supports no Tcl pipelines, see "[Inventory of IPC methods]" for generalizations that apply there and elsewhere. ---- [[Explain "named pipe" as specialization of concept.]] ---- [idiom]