From: Bertram Scharpf Date: 2009-07-07T22:32:26+09:00 Subject: Re: $stdout to printer Hi, Am Dienstag, 07. Jul 2009, 20:10:53 +0900 schrieb Brian Candler: > (1) File.open("prn:","w") { |f| ... } > (2) IO.popen("print","w") { |f| ... } The original question was how to redirect $stdout. def print_it IO.popen "lpr -o some_option", "w" do |f| $stdout = f yield end ensure $stdout = STDOUT end Sorry, I can only test and will only provide the UNIX version. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de