No such thing as a small change | |
PerlMonks |
Re: system commands and returnsby JavaFan (Canon) |
on Nov 30, 2011 at 00:12 UTC ( [id://940737]=note: print w/replies, xml ) | Need Help?? |
It doesn't "return" to the UNIX command prompt. I does exactly what you ask it to do: start up a *new* shell, as the user passed in as $_[0]. Typing exit causes this new shell to exit, which causes the system to terminate, which causes the next command to run.
If you want to run commands as the other user, pass them as an argument to su.
In Section
Seekers of Perl Wisdom
|
|