#!/usr/bin/perl -w use strict; use Carp; use GPG; my( $gpg ) = new GPG( homedir => "/home/bob/.gnupg" ); croak $gpg->error() if $gpg->error(); my($text) = join( "", <> ); my( $dec ) = $gpg->decrypt( BOBS_PASSPHRASE, $text ); croak $gpg->error() if $gpg->error(); print $dec;