[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] [PATCH v3] quilt mail: Add way to sign mail with GPG
From: |
H. Peter Anvin |
Subject: |
Re: [Quilt-dev] [PATCH v3] quilt mail: Add way to sign mail with GPG |
Date: |
Wed, 12 Oct 2011 11:57:20 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0 |
On 10/12/2011 02:56 AM, Andreas Gruenbacher wrote:
>
>> As for removing the temp file, I just found it was the easiest way to
>> pipe into gpg. If there's a better way to do that, I'm all ears.
>
> ... how about this approach?
>
> my @lines = <>;
> map { print } @lines;
> print "\n";
>
> #-----------------------------------------------
>
> sub crlf($) {
> my $_ = shift;
> #s/\n$/\r\n/;
> s/^/> /;
> return $_;
> }
>
> my $command = 'tr a-z A-Z';
> open(PIPE, "| $command")
open(PIPE, '|-', $command);
... please; better yet with a list (@command) so it doesn't doesn't pass
through the shell.
-hpa