Why are you using system calls to chown and chmod when Perl has those commands built-in?
Why are you setting the permissions to 777? That opens up security concerns.
Why are you using a system call to execute run.bat when Perl can run it directly?
Where's your error handling?