more cleanups
[spider.git] / perl / winclient.pl
index cf0da0a2ffef78deeceeac86b0356e9a8e3f64e1..a8188b9dcb49abb5d5137ff6104b9f31b2d2fc87 100755 (executable)
@@ -77,13 +77,14 @@ if ($childpid) {
                my ($sort, $call, $line) = $msg =~ /^(\w)([^\|]+)\|(.*)$/;
                if ($sort eq 'Z') {
                        kill 'TERM', $childpid;
+                       exit(0);
                } elsif ($sort eq 'E' || $sort eq 'B') {
                        ;
                } else {
                        # newline ends all lines except a prompt
                        $lastend = $end;
                        $end = "\n";
-                       if ($line =~ /^$call de $mycall\s+\d+-\w\w\w-\d+\s+\d+Z >$/) {
+                       if ($line =~ /^$call de $mycall\s+\d+-\w\w\w-\d+\s+\d+Z >$/o) {
                                $end = ' ';
                        }
                        my $begin = ($lastend eq "\n") ? '' : "\n";