From: James Edward Gray II Date: 2007-07-15T13:12:41+09:00 Subject: Re: Calling a Perl script from Ruby On Jul 14, 2007, at 9:44 PM, M. Edward (Ed) Borasky wrote: > Dave Coleman wrote: >> Tim Hunter wrote: >>> Check out the system() method. >> looks like system only returns true or false if the system call >> executes >> successfully. What if you want to evaluate what's returned from that >> perl script? >> > IIRC "system" returns the (implementation-dependent) numerical return > code of the call, where by tradition "0" is success and non-zero is an > application-dependent error number. If Ruby is returning "true" on > success and "false" on failure, that's different from what many > environments do. It does, but you can get the exit code: system("date") # => true $?.to_i # => 0 # >> Sat Jul 14 23:11:49 CDT 2007 James Edward Gray II