open(PGP, "|gpg -output file -encrypt -recipient ..."); while () { print PGP } close(PGP);