projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5254ea7
)
kludge spurious \x00 between \r and \n (artifact from Net::Telnet?)
author
djk
<djk>
Mon, 12 Jun 2000 11:54:51 +0000
(11:54 +0000)
committer
djk
<djk>
Mon, 12 Jun 2000 11:54:51 +0000
(11:54 +0000)
perl/client.pl
patch
|
blob
|
history
diff --git
a/perl/client.pl
b/perl/client.pl
index 4a472984a0c3320684edc357148f6c295e823e68..1b6757b48c27c09c63ea7f19f1a4167a50c014d8 100755
(executable)
--- a/
perl/client.pl
+++ b/
perl/client.pl
@@
-178,8
+178,9
@@
sub rec_stdin
cease(1);
} elsif ($r > 0) {
if ($mode) {
cease(1);
} elsif ($r > 0) {
if ($mode) {
- $buf =~ s/\r/\n/og if $mode == 1;
- $buf =~ s/\r\n/\n/og if $mode == 2;
+ $buf =~ s/\r/\n/g if $mode == 1;
+ $buf =~ s/[\r\x00]//g if $mode == 2;
+
$dangle = !($buf =~ /\n$/);
if ($buf eq "\n") {
@lines = (" ");
$dangle = !($buf =~ /\n$/);
if ($buf eq "\n") {
@lines = (" ");
@@
-278,7
+279,7
@@
sub dochat
dbg('connect', "received 0 length line, aborting...");
cease(11);
}
dbg('connect', "received 0 length line, aborting...");
cease(11);
}
- $line =~ s/\r
\n/\n/o
g;
+ $line =~ s/\r
//
g;
chomp;
} elsif ($csort eq 'ax25' || $csort eq 'prog') {
local $/ = "\r";
chomp;
} elsif ($csort eq 'ax25' || $csort eq 'prog') {
local $/ = "\r";
@@
-287,7
+288,8
@@
sub dochat
dbg('connect', "received 0 length line, aborting...");
cease(11);
}
dbg('connect', "received 0 length line, aborting...");
cease(11);
}
- $line =~ s/\r//og;
+ $line =~ s/\r/\n/g;
+ chomp;
}
dbg('connect', "received \"$line\"");
if ($abort && $line =~ /$abort/i) {
}
dbg('connect', "received \"$line\"");
if ($abort && $line =~ /$abort/i) {