You can try to use IPC::Run. Very clean and flexiable API (I also prefer to use it over system for this reason) and it is more reliable (I've seen many people to complain about problems with IPC::Open2 under mod_perl which were fixed in no time when they switched to IPC::Run).