You get the return value of any command in $? >> 8. I don't understand the title of your question (which is different from the content) though. What do you mean with "multiple return values"? A process only has a single return value. And it's an integer between 0 and 255, inclusive.
Comment on Re: getting multiple return values from system()
Sorry, what I ment was: one return value from the ssh command and one from the useradd command. My question was for the second one only.
Thank you for the fast response!
handarbyte