$x = system("echo y"); $x = $x/255; #set $x to actual exit value $y = system("blahblah"); $y = $y/255; #set $y to actual exit value