#!/usr/bin/perl use warnings; use strict; use IPC::Open3; local $SIG{CHLD} = 'IGNORE'; local $SIG{PIPE} = 'IGNORE'; my $childpid = open3(\*IN, \*OUT, \*ERR, 'gpg -v --no-greeting --no-tty --command-fd 0 --status-fd 1 --edit zentara'); print IN "trust\n5\ny\n"; close IN; my(@answer,@err); @answer = ; print "out->@answer\n"; @err = ; print "err->@err\n";