http://www.perlmonks.org?node_id=940794


in reply to system commands and returns

Split your script into two. One part is the launcher and the other is the code to run under the second user. Use something like this:
system("su -c ./script2.pl");

Update: By the way, your sub Chg_Directory suffers from a similar problem, it will only change the directory of the child process. Use chdir.