in reply to Change shell within Perl

If you're looking to script your interaction with the shell then you can use Expect.

However, I'd be asking myself if all I'm doing with perl is running a shell script - why not just write a shell script?