cat file |gpg --passphrase-fd 0 --decrypt --output oldfile newfile #### my $enc_pass = shift( @{ [ <$file> ] } ); #### for (;;) { print $_; }