use strict; use warnings; use IPC::Open3; use Data::Dumper; my ($w,$r,$e, @pids); push @pids, open3($w,$r,$e, qw(ls -al)); push @pids, open3($w,$r,$e, qw(ls -al)); push @pids, open3($w,$r,$e, qw(borked mang)); # tye commented privately that I seem to misunderstand open3, so I just thought # I'd mention that I'm perfectly aware I'm screwing up the file handles both by # reusing them and failing to close them. This is just an example... Perhaps it's # because the ls doesn't print to stdout? I suppose that isn't the same as system(). # *shrug* my @ret = map {[waitpid($_,0) => $?]} @pids; print "", Dumper(\@ret), "\n";