Hey,

On 2013-03-18 00:27, Arno Töll wrote:
>     open(CMD, '-|', $GPG, @gpg_arguments) || leave "$GPG: $!\n";
>     while (my $l = <CMD>)
>     {
>         if ($l =~ /^pub/)
>         {
>             $uid = $l;
>             last;
>         }
>     }

You may want to consume the rest of CMD here; not sure about GPG, but
some programs will die with a SIGPIPE if you only consume part of their
output.
  I believe something like:

     1 for <CMD>;

should do[1].

>     my @fields = split(":", $uid);
>     $uid = $fields[9];
>     close(CMD) || leave("gpg returned an error: $?");


~Niels

[1] Should be the same as the slightly more verbose:

  {
    local $_;
    while (<CMD>) {
        1;
    }
  }

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to