Re: Crypt::GPG won't decrypt file...rewrote it to use system, but only partially works
- From: mumia.w.18.spam+nospam@xxxxxxxxxxxxx (Mumia W.)
- Date: Fri, 30 Jun 2006 10:53:23 -0500
RICHARD FERNANDEZ wrote:
[...]
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");
AFAIK, you can't use "2> file" to do output redirection when you use the multiple-arguments form of 'system' because the shell isn't available.
Use open() to redirect STDERR to /dev/null before you call system.
Read "perldoc -f open."
system(@gpg_command) == 0 or warn "system @gpg_command failed:
$!";
it does not work. Instead I get a "usage" error.
[...]
gpg doesn't know what to do with a parameter of "2> /dev/null."
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
You're welcome.
.
- References:
- RE: Crypt::GPG won't decrypt file...rewrote it to use system, but only partially works
- From: Richard Fernandez
- RE: Crypt::GPG won't decrypt file...rewrote it to use system, but only partially works
- Prev by Date: Re: A string & a list
- Next by Date: Re: A string & a list
- Previous by thread: Re: Crypt::GPG won't decrypt file...rewrote it to use system, but only partially works
- Next by thread: RE: Crypt::GPG won't decrypt file...rewrote it to use system, but only partially works
- Index(es):