Instead of
system, you can use a pipe and pass
the information via the pipe. Then the password doesn't appear
in a file, nor can it be found with ps from either the command
line, or an environment variable.
As for the global variable suggestion - think about it. Even if
it were possible, how would you prevent other programs from reading
it?
Abigail