use strict; use IPC::Run3; my (@in, @out, @err); run3( $your_command, \@in, \@out, \@err );