Help for this page

Select Code to Download


  1. or download this
    $SIG{ALRM} = sub { die "TIMEDOUT" };
    
    ...
    # execute $sub with timeout
    alarm(1);
    $sub->();
    
  2. or download this
    visible at -e line 1.
    invisible at -e line 1.