Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^5: Does IO::Select work? (Problem partially resolved)

by BrowserUk (Pope)
on Oct 23, 2012 at 10:11 UTC ( #1000462=note: print w/replies, xml ) Need Help??

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;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000462]
help
Chatterbox?
[marioroy]: LA, yeah. than there's no reason why it cannot work inside qx. But chatting is hard in PM. I cannot see the code now.
[shmem]: Lady_Aleena: sometimes a quick glance isn't enough.
[Lady_Aleena]: What?! Can't stat ~/Music: No such file or directory? The ~/ doesn't expand?
[Lady_Aleena]: And the env variable $HOME doesn't work either. !@#$
[shmem]: no, that's a shell feature. Use $ENV{HOME}
[marioroy]: my $ans = qx{ find \$HOME -name "*.pl" -exec ls -l {} \\; };

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2017-04-23 21:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.