Uninitialized value in controlchan

Russ Allbery rra at stanford.edu
Wed Nov 22 06:49:53 UTC 2006


Julien ÉLIE <julien at trigofacile.com> writes:

> Whenever a control article is successfully processed, I have :

> Error log:
> Use of uninitialized value in concatenation (.) or string at /usr/lib/news/bin/controlchan line 315.


>     if ($logfile eq 'mail') {
>         my $mail = sendmail($message);
>         print $mail map { s/^~/~~/; "$_\n" } @$headers;
> ------> print $mail "$_\n" . join ('', map { s/^~/~~/; "$_\n" } @$body)
>             if $body;
>         close $mail or logdie("Cannot send mail: $!");
>         return;
>     }

> Shouldn't it be directly :

> print join ('', map { s/^~/~~/; "$_\n" } @$body)

No, it's trying to print the blank line between the headers and the body.
The $_ just shouldn't be there.  Thanks, fixed.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>



More information about the inn-patches mailing list