From: "max" <max / solution-x.com> > > how can ruby read the 2? it is somethinng with the stdin or? > > when i do > puts `perl test.pl 1` > > it outputs 2 > nil > Use 'irb' until you find the answer: e.g. Gavin Sinclair@NOSEDOG /tmp/a $ cat > print2.sh #!/bin/bash echo 2 Gavin Sinclair@NOSEDOG /tmp/a $ irb --simple-prompt >> output = `print2.sh` => "2\n" >> output.to_i => 2 >>