Help for this page

Select Code to Download


  1. or download this
    { 
        my $sock = new IO::Socket::INET( 'localhost:12345' );
    }
    ## Here the handle is closed.
    
  2. or download this
    for( 1 .. 2 ){ 
        my $sock = new IO::Socket::INET( 'localhost:12345' );
    }    
    ## The first handle was implicitly closed during the second iteration.
    
  3. or download this
    ...
        my $client = $svr->accept;
        async {
            ## do things with $client
        }->detach;
    
  4. or download this
    ...
        my $client = $svr->accept;
    ...
            sleep 10;
            ## attempts to use $client fail
        }->detach;