projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a mostly working send message implementation
[spider.git]
/
perl
/
client.pl
diff --git
a/perl/client.pl
b/perl/client.pl
index 2a41c221320fbef8120d2af0598a69f6da5be6be..834aaf37ce2e33a019987e1ad2b4fe0d8fc1c653 100755
(executable)
--- a/
perl/client.pl
+++ b/
perl/client.pl
@@
-39,6
+39,7
@@
BEGIN {
use Msg;
use DXVars;
use Msg;
use DXVars;
+use Carp;
$mode = 2; # 1 - \n = \r as EOL, 2 - \n = \n, 0 - transparent
$call = ""; # the callsign being used
$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$/);
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 {
if ($dangle) { # pull off any dangly bits
$buf = pop @lines;
} else {