OK. Now i do not have any error messages.
1. Using first command as shown above i want to create an environment. I was able to create it from my .pl script its is perfectly fine.
2. Once the environment is created the perl script idles it will not run the next line untill i exit form the environment.
3. I want to run the commands in the environment which was created by first command.
I tried using cojoined command or individually one after another. but the perl idles aftre finishing the first command it wont run the rest of the lines untill i exit from the created environment.