I have a lot of script written with perl, and we want to call those
script with our new ruby application. and we don't know how!!! Can
anyone tell us how should we do this????
Thanks you vbery much
Sayoyo
You can run a system command via:
`perl myPerlScript.pl`
or check the system method
Thanks for the information, but how can I get the results from our perl
script.???
actually, we find out that we can use this code:
obj = IO.popen("/usr/bin/perl hello_world.pl world", "w+")
obj.close_write
toto = obj.gets
obj.close
puts toto
but is there other way to do this?
sayoyo
Well:
foo = `type readme.txt`
will put the contents of readme.txt into foo, so is good for grabbing
stdout from the external app
Or you can check out popen3 if you need separate acces to STDIN, STDOUT
and STDERR