From: zyzygy@... Date: 2006-01-05T20:07:58+09:00 Subject: Redirecting CGI#out to a string Hi All For my first "production" ruby app, I'm writing a self contained web interface to the TSM backup product, based on some existing, awful, perl code. I'm using webrick because the number of requests will be small, and I want it cross platform and as self-contained as possible. I'd prefer to generate my html using the CGI class, but webrick needs a string to be returned and CGI#out writes to standard output. I've played with redirecting $stdout to a StringIO object, but haven't been able to get that to work, and also that doesn't seem to be the Ruby way, its more Perl-ish. Can some kind soul please point me in the right direction? TIA Steve. AIX and TSM Administrator Brisbane Australia