I am using system() command in my program.I need to check its return status i.e. whether it has failed or succeeded.
I used $ret = system("my commands");
But $ret prints 0 for both the cases - success as well as failure.
I tried using $? too, but the result is same.