From: Josef 'Jupp' Schugt Date: 2004-11-23T06:22:47+09:00 Subject: Re: Having Ruby 1.8 decide on "File.open" or 'IO.popen'? Neil Stevens wrote: > On Sun, 21 Nov 2004 07:41:04 +0900, Josef 'Jupp' Schugt wrote: >> >>SomeClass.open('/var/spool/mail/jupp') >>SomeClass.open('| /usr/bin/fetchmail') >> >>Or is there good reason *not* to do that? > > > "| " are valid characters to start a filename, so how would you > distinguish what is intended? By means of quoting: SomeClass.open('| /usr/bin/fetchmail') # Stream SomeClass.open('\|\ /usr/bin/fetchmail') # File Josef 'Jupp' Schugt -- Messages larger than 100 KiB will be discarded *without* notification! http://oss.erdfunkstelle.de/ruby/ German ed. of comp.lang.ruby FAQ