This message has been automatically forwarded from the ruby-talk mailing list by a gateway at pragprog.com. If it is SPAM, it did not originate at pragprog.com. Please report the original sender, and not us. Thanks! wrote: > 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 > >> > > i wrote my test.pl with a print 2. but when i execute output = `test.pl` i get an error. irb(main):001:0> output = `test.pl` (irb):1: command not found: test.pl "" greetings max