in reply to GPG decryption

According to the docs for GPG, decrypt_verify() and friends take the actual text as the second argument, not a file name. Try:
... open GPGFILE, "try.gpg" or die "Couldn't open try.gpg: $!"; my $text = do {local $/; <GPGFILE>}; close GPGFILE; my $file=$gpg->decrypt_verify($passphrase,$text); print $file->{text}; ...

Replies are listed 'Best First'.
Re: Re: GPG decryption
by chinesebob (Initiate) on Jan 23, 2003 at 12:02 UTC
    Instead of using the module I tried the
    system(gpg ......);
    and it worked. Go figure. thank you anyways.
Re^2: GPG decryption
by snookmz (Beadle) on Nov 16, 2004 at 21:28 UTC
    I was racking my brain trying to work out why:

    $gpg->decrypt(pass,$text)

    wasn't working for $text

    The GPG pod wasn't clear to me on this issue, thanks for clearing it up for us Paladin :)