X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=perl%2Fclient.pl;h=834aaf37ce2e33a019987e1ad2b4fe0d8fc1c653;hp=2a41c221320fbef8120d2af0598a69f6da5be6be;hb=57b5e464bc44ae8eee23ab94c1f499f527595dc9;hpb=23d995215379c4786c2cb1d930a09c734c2472aa 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 {