removed a warning from client
[spider.git] / perl / client.pl
index c6f5bd2806c12d0ad0359af074fbf132cc7821ed..1a57a1c6e983bb229d283fe4f040ff0aee9e3c2a 100755 (executable)
@@ -45,7 +45,7 @@ use IO::File;
 use IO::Socket;
 use IPC::Open2;
 use Net::Telnet qw(TELOPT_ECHO);
-use Carp;
+use Carp qw{cluck};
 
 # cease communications
 sub cease
@@ -60,6 +60,7 @@ sub cease
                kill(9, $pid);
        }
        dbgclose();
+#      $SIG{__WARN__} = sub {my $a = shift; cluck($a); };
        sleep(1);
        exit(0);        
 }
@@ -324,9 +325,9 @@ $waitedpid = 0;
 # deal with args
 #
 
-$call = uc shift @ARGV;
+$call = uc shift @ARGV if @ARGV;
 $call = uc $myalias if !$call;
-$connsort = lc shift @ARGV;
+$connsort = lc shift @ARGV if @ARGV;
 $connsort = 'local' if !$connsort;
 
 $loginreq = $call eq 'LOGIN';
@@ -473,7 +474,7 @@ if (! $conn) {
                open IN, "$data/offline" or die;
                while (<IN>) {
                        s/\n/\r/og if $mode == 1;
-                       print $stdout;
+                       print $stdout $_;
                }
                close IN;
        } else {