Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Stumped with select->can_read (example)

by w1r3d (Initiate)
on Aug 06, 2012 at 16:07 UTC ( #985766=note: print w/ replies, xml ) Need Help??


in reply to Re: Stumped with select->can_read (example)
in thread Stumped with select->can_read

Wow, awesome! I implemented that into my code, and that seems to work great! Thanks!

I do have a question, though. I'm not sure what the line: "for my $buf ( $buf{$fh} )" is doing. Is the hash "%buf" getting initialized as the $buf variable gets populated with the sysread calls? That's the only line in the code that I'm struggling to understand. :/

Thanks again!

Pedro


Comment on Re^2: Stumped with select->can_read (example)
Replies are listed 'Best First'.
Re^3: Stumped with select->can_read (alias)
by tye (Cardinal) on Aug 06, 2012 at 17:22 UTC

    It just makes $buf an alias for $buf{$fh} so I don't have to type the {$fh} part over and over.

    - tye        

      Ah, makes sense. Thanks again =)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985766]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2015-07-29 03:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls