RE: Crypt::GPG won't decrypt file...rewrote it to use system, but only partially works
- From: rfernandez@xxxxxxxxx (Richard Fernandez)
- Date: Fri, 30 Jun 2006 11:20:06 -0400
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
.
- Follow-Ups:
- Prev by Date: Re: renaming files
- Next by Date: Re: "Misses" in a loop
- Previous by thread: renaming files
- Next by thread: Re: Crypt::GPG won't decrypt file...rewrote it to use system, but only partially works
- Index(es):