in reply to Executing / Retrieving Output from Command
First, could you post the code you actually used?
It might also help if you said which platform you are using. (Windows, Cygwin, unix)
What's $?? $! is only meaningful if $? is -1.