If a variable is provided as the second argument, then the return status code of the executed command will be written to this variable.
system() is just like the C version of the function in that it executes the given command and outputs the result. If a variable is provided as the second argument, then the return status code of the executed command will be written to this variable.