X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fclient.pl;h=834aaf37ce2e33a019987e1ad2b4fe0d8fc1c653;hb=b5b58db69484da5554b4f7e10b813d13e8cf16cb;hp=2a41c221320fbef8120d2af0598a69f6da5be6be;hpb=78ed3f6025103ec1c47c90725e37b417647d83c8;p=spider.git diff --git a/perl/client.pl b/perl/client.pl index 2a41c221..834aaf37 100755 --- a/perl/client.pl +++ b/perl/client.pl @@ -39,6 +39,7 @@ BEGIN { use Msg; use DXVars; +use Carp; $mode = 2; # 1 - \n = \r as EOL, 2 - \n = \n, 0 - transparent $call = ""; # the callsign being used @@ -147,7 +148,11 @@ sub rec_stdin if ($mode) { $buf =~ s/\r/\n/og if $mode == 1; $dangle = !($buf =~ /\n$/); - @lines = split /\n/, $buf; + if ($buf eq "\n") { + @lines = (" "); + } else { + @lines = split /\n/, $buf; + } if ($dangle) { # pull off any dangly bits $buf = pop @lines; } else {