From: Pen Ttt Date: 2010-05-28T11:51:33+09:00 Subject: Re: how to call gnuplot from ruby? i don't know the difference of w and r. program_a1: f=IO.popen("gunzip -c ~/grid.zip","w") while line=f.gets print line end program_a2: f=IO.popen("gunzip -c ~/grid.zip","r") while line=f.gets print line end program_a1 and program_a2 all can run ,what's the difference? there is game--freeciv installed in my computer. programb1: File.popen("/usr/games/civ","w") do |pipe| quote = pipe.gets puts quote end programb2: File.popen("/usr/games/civ","r") do |pipe| quote = pipe.gets puts quote end program_b1 and program_b2 all can run ,what's the difference? -- Posted via http://www.ruby-forum.com/.