I re-wrote the decryption routine to use system instead of Crypt::GPG,
and came across another puzzle:

        my @gpg_command = ("/usr/bin/gpg --decrypt $encrypted >
$decrypted 2> /dev/null");
        system(@gpg_command) == 0 or warn "system @gpg_command failed:
$!";

works. It decrypts my file successfully. But if I break up the arguments
like it says in the doco, like so:

        my @gpg_command = ("/usr/bin/gpg", "--decrypt", $encrypted, ">",
$decrypted, "2> /dev/null");
        system(@gpg_command) == 0 or warn "system @gpg_command failed:
$!";

it does not work. Instead I get a "usage" error.


Could someone please explain where I've gone wrong? I would like to use
Crypt::GPG instead of system, but I have to get this finished.
Thanks!

richf

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to