I'm relatively new, but it doesn't seem to me that you want to be using fork. perldoc: func describes fork() as: "fork - create a new process just like this one".
Perhaps what you want is perldoc: system which lets you call other executable code and wait for that code to complete.