On 17.08.2007 23:42, greg wrote:
> Can anyone help me with the following issue: How can I call a program
> (such as less, g++ etc.) from ruby script and save the output to a
> variable inside the ruby script?

The easiest forms are these

x=`ls -l`
x=%x{ls -l}

For more complex interactions please look at various versions of popen.

Kind regards

	robert