you make a couple mistakes... see below... David Gerler wrote: > > > if ($OS eq "windows") { > $outfile = ".\\$scratchPad\\"."temp1.txt"; > $cmd = "c:\\gnupg\\gpg -ea -r ezbid > $outfile";
you are rediecting the output to a file. if you try to read from STDOUT again later, you won't see them.... > } else { > #$outfile = "./temp1.txt"; > $outfile = $dir . "temp1.txt"; > $cmd = "gpg -ea -r ezbid --always-trust --no-secmem-warning > > $outfile"; same thing in here... > } > $number; > > $pid = open2(\*FILEIN, \*GPGOUT, "| $cmd"); you don't need the '|' character, open2 will take care the piping for you. i posted you a simple example using open3 which also let you read from STDERR. the example shows how to use open3 to interact(read/write) from bc david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]