about summary refs log tree commit
path: root/Net/Cmd.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Net/Cmd.pm')
-rw-r--r--Net/Cmd.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Net/Cmd.pm b/Net/Cmd.pm
index f1e436d..f7c7484 100644
--- a/Net/Cmd.pm
+++ b/Net/Cmd.pm
@@ -21,7 +21,7 @@ BEGIN {
   }
 }
 
-$VERSION = "2.26";
+$VERSION = "2.26_01";
 @ISA     = qw(Exporter);
 @EXPORT  = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);
 
@@ -431,7 +431,8 @@ sub datasend
  while($len)
   {
    my $wout;
-   if (select(undef,$wout=$win, undef, $timeout) > 0 or -f $cmd) # -f for testing on win32
+   my $s = select(undef,$wout=$win, undef, $timeout);
+   if ((defined $s and $s > 0) or -f $cmd) # -f for testing on win32
     {
      my $w = syswrite($cmd, $line, $len, $offset);
      unless (defined($w))