in reply to assigning system command output to a variable

$sample = `./my_command`;
The return code for system is only a code for success or failure.

--Bob Niederman, http://bob-n.com

All code given here is UNTESTED unless otherwise stated.