in reply to return values with system()

When I run the application locally it sets the environment variable $status to 4.

Oh? How do you run it? Do you source it? Eval it? Are you on unix or a unix-like OS? If what you claim is true, you should theoretically be able to system("$cmd; exit \$status") but your command should not be able to affect its parent's shell.

Oh, wait... do you use csh tcsh or something?... that would explain $status. (I'm bourne-shell-centric, I guess.)

-sauoq
"My two cents aren't worth a dime.";