open my $cmd, '|-', 'xyz' or die $!; print {$cmd} "command1\n"; print {$cmd} "command2\n";