in reply to IPC::Open2 Help.

Like the manual says, IPC is hard to use when you didn't write the program you are opening. You could grab the source to PGP, switch on debugging and see where it is stopping, if it has finished, etc.

My (old) version of PGP encrypted files fine. Just write your message to a text file (in the tmp or c:\temp directory) and then read the final file. It used to be pgp -e filename.txt etc.etc.

If at this point you start pointing out that you are worried about someone reading your harddrive sector by sector then you should probably go to the effort of installing one of the PGP modules from CPAN.

____________________
Jeremy
I didn't believe in evil until I dated it.

Replies are listed 'Best First'.
Re: Re: IPC::Open2 Help.
by zzspectrez (Hermit) on Nov 28, 2000 at 22:48 UTC

    I have been able to get it to work if Im either just reading or just writing to pgp by opening it with a pipe. The problem is I want to do this without a temporary file.

    The -f option as explained in the pgp documentation is used for UNIX-style filter mode to read from standard input and write to standard output. So I would think that you should be able to get this to work, and Im just doing something wrong.

    Looking to see how the modules work, I noticed that they are just do what Im trying to do. For example, looking at the module PGP::Pipe.pm I see that it is using the basic same method: $result = open3 ($fin, $fout, $ferr, "$self->{PGPexec} $baseopts $args") || croack "PGP command error"; So the error is in my code somewhere. I think Ill try to figure out how this module is doing stuff.

    Thanks.
    zzSPECTREz