our $GPG = qq|/usr/local/bin/gpg --no-version --comment "" --no-secmem-warning --no-permission-warning --homedir "./.gnupg" --no-tty|; # List keys my $cmd = qq|$GPG --fingerprint --list--keys --with-colons|; # Delete specific key my $cmd = qq|$GPG --delete-secret-and-public-keys 0x$Fingerprint|; # etc. etc. etc. # my $Result = qx|$cmd|; my @PGPKeys = split(/\n/,$Result); # Do something . . .