To add to AppleFritter's comments:
- Each system call will have its own environment. If this is the akin to the module system that I used in the early '90s (setting up the environment and tools for a shell in a package-type manner), you will lose all of the module setup at the end of the system call.
- Unless given some other reason to convert it to Perl, I would echo the suggestion to leave it in shell. This is what it is made for.