in reply to Re^2: IO::Socket tutorial
in thread IO::Socket tutorial
I don't even remember what got me thinking that IO::Socket's can be used as file descriptors
Technically they can be used like handles (not descriptors), they're subclasses of IO::Handle. But as you discovered, doing a readline on them is blocking; from my experience I very much prefer non-blocking operations, and those are IMHO best abstracted via an event-based interface.
In terms of example code, I should have been more specific: a Short, Self-Contained, Correct Example.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: IO::Socket tutorial
by BernieC (Pilgrim) on Feb 19, 2020 at 21:05 UTC | |
by haukex (Archbishop) on Feb 20, 2020 at 00:31 UTC | |
by BernieC (Pilgrim) on Feb 20, 2020 at 12:22 UTC | |
by haukex (Archbishop) on Feb 20, 2020 at 14:02 UTC | |
by tybalt89 (Monsignor) on Feb 20, 2020 at 14:42 UTC | |
by BernieC (Pilgrim) on Feb 20, 2020 at 20:13 UTC | |
|