From: Pit Capitain Date: 2006-10-05T16:14:29+09:00 Subject: Re: command help Tom Allison schrieb: >>> hostname = open("|hostname").gets > > What's with the pipe being at the wrong end? > What's the thinking behind that? You can find a short description in ri or the Pickaxe: C:\tmp>ri IO -------------------------------------------------------------- Class: IO Class +IO+ is the basis for all input and output in Ruby. An I/O stream may be _duplexed_ (that is, bidirectional), and so may use more than one native operating system stream. Many of the examples in this section use class +File+, the only standard subclass of +IO+. The two classes are closely associated. As used in this section, _portname_ may take any of the following forms. * A plain string represents a filename suitable for the underlying operating system. >>>>> * A string starting with ``+|+'' indicates a subprocess. The remainder of the string following the ``+|+'' is invoked as a process with appropriate input/output channels connected to it. >>>>> * A string equal to ``+|-+'' will create another Ruby instance as a subprocess. Regards, Pit