Help for this page

Select Code to Download


  1. or download this
    my $state = 1;
    ioctl( $handle, 0x8004667e, \$state );
    ...
    }
    $state = 0;
    ioctl( $handle, 0x8004667e, \$state );
    
  2. or download this
    my $sel = IO::Select->new($handle);
    my $end = time() + $timeout;
    ...
        last if !$sel->can_read($left);
        my $read = sysread( $handle, $buffer, 100, length( $buffer ) );
    }