Help for this page

Select Code to Download


  1. or download this
       $SIG{ALRM} = sub { die 'timeout' };
    
  2. or download this
       use strict;
       use IO::Select;
    ...
       unless(IO::Select->can_read(1) ) { die "timed out!"; }
       print while(sysread(CMD, $_, 4096));
       close(CMD);