open( my $fh, '>', 'pt.txt' ); my $pt = $pgp->decrypt(Filename => $file, Passphrase => $pp); $fh = $pt; close $fh;