From: ts Date: 2002-11-09T20:31:10+09:00 Subject: Re: Can I run other program in Ruby program and get result? >>>>> "S" == Sheen Zan writes: S> I write a hello world program using c++, which output "Hello world!", S> I compile it into hello.o. Now, I want to write a Ruby program, which can run S> hello.o in it and catch the output "Hello world!". What am I use in Ruby S> to do this? Well, if you want to call an external program you can use `` igeon% cat a.c #include main() { printf("Hello world !\n"); } pigeon% pigeon% cc a.c pigeon% pigeon% cat b.rb #!/usr/bin/ruby res = `a.out` puts "result : #{res}" pigeon% pigeon% b.rb result : Hello world ! pigeon% Guy Decoux