From: Neil Stevens Date: 2004-11-21T08:33:18+09:00 Subject: Re: Having Ruby 1.8 decide on "File.open" or 'IO.popen'? On Sun, 21 Nov 2004 07:41:04 +0900, Josef 'Jupp' Schugt wrote: > Hi! > > To write to (mbox) file I use "File.open('/var/spool/mail/jupp')". To > write to a (MDA) stream I would use "File.popen('/usr/bin/fetchmail')". > Is there an *existing* means that I can use for both purposes so that I > can code as follows? > > 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? -- Neil Stevens - neil@hakubi.us "The world is a dangerous place to live; not because of the people who are evil, but because of the people who don't do anything about it." -- Albert Einstein(?)