system runs a separate process, so you're spawning a new process, running su in that, and then exiting. I think you need to stay in the process once you've switched users. Perhaps something like IPC::ShellCmd::Sudo (I haven't used it) would help?
Improve your skills with Modern Perl: the free book.
In reply to Re: system commands and returns
by chromatic
in thread system commands and returns
by perl_zen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |