|Just another Perl shrine|
[Win32] IO::Select's can_read methodby syphilis (Chancellor)
|on Dec 09, 2011 at 09:16 UTC||Need Help??|
syphilis has asked for the
wisdom of the Perl Monks concerning the following question:
Hi, In a nutshell, the IO::Select can_read method doesn't work on MS Windows, afaict.
On Cygwin and Linux, as expected, that prints out the first 7 lines of itself (ie the first 7 lines of $0).
But on Windows, it just prints out "@r contains no elements".
This happens because can_read() fails to return anything on Windows - and that's irrespective of the timeout value supplied as an argument to can_read (or even if *no* argument is supplied).
So ... I'm wondering how (on Windows) do we query an IO::Select object in such a way that it returns the same as can_read does on Cygwin/Linux ?