in reply to Perl GPG Chat
GnuPG::Tie::Encrypt from GNUPG, from the given example, would appear to be more what you might be looking for. It uses a tied file handle to interface with GnuPG, rather than requiring data to be written to a file to be encrypted.
Hope that helps.
In Section
Seekers of Perl Wisdom