in reply to Re: Returned Code
in thread Returned Code

[nobody@nowhere]$ cat t.cpp #include <iostream> using namespace std; int main() { cout << "C++ retVal: 3" << endl; return 3; } [nobody@nowhere]$ cat t.pl #!/usr/bin/perl system("./a.out"); printf "Got retval: %d\n", $?>>8; [nobody@nowhere]$ ./t.pl C++ retVal: 3 Got retval: 3 [nobody@nowhere]$