in reply to IO::Select woes

I tried writing a test script to see if I can reproduce the issue, but unfortunately the script works fine either way.

This is the value of an SSCCE - it shows that there is something else amiss in your production script which is causing the problems. Your next task is to identify what else it might be in the production script and to incorporate that into your test script. Keep doing that until you can reproduce the problem.

Interestingly, when I put a print statement (marked HERE) in my script, the can_read() seems to work.

Given your use of IO::Select it could well be that you've done something unexpected with STDOUT and the currently selected handle in the code you have not shown us. Perhaps that is worthy of your attention?

Note that in your original post you have used the phrase "the script" and "my script" to refer to both your production script and your test script at various places. This just adds to the confusion. Try to be as specific and unambiguous as possible.


🦛

Replies are listed 'Best First'.
Re^2: IO::Select woes
by Anonymous Monk on May 04, 2023 at 17:59 UTC
    Thank you for taking the time to decipher, hippo! after posting it and reading haj's response, I realized my post was a bit confusing, so I apologize. I guess the point I want to emphasize is that my production script works fine through the debugger. This has happened to me before and it has always stemmed from library issues getting loaded during a debug session, but not production. I'll keep looking for differences between my prod & test script...