open my $shell, '|-', '/bin/sh' or die "Can't run the shell: $!"; # pick whatever shell you like here. for my $cmd (@cmds) { print $shell "( $cmd > /dev/null 2> /dev/null )"; }