#!/usr/bin/perl -w use strict; use CGI::Carp qw(fatalsToBrowser); #show us the errors in the browser use Crypt::OpenPGP; my $gpg = Crypt::OpenPGP->new; my $encrypted = $gpg->encrypt( Data => "Testing GPG", KeyID => $ARGV[0], Armour => 1, ) || die $gpg->errstr; print <<"_END_"; Content-type: text/plain Encrypted: -> $encrypted <- _END_