What does “select((select(s),$|=1)[0])” do in Perl?

后端 未结 7 679
执念已碎
执念已碎 2020-12-03 01:19

I\'ve seen some horrific code written in Perl, but I can\'t make head nor tail of this one:

select((select(s),$|=1)[0])

It\'s in some netwo

相关标签:
7条回答
  • 2020-12-03 01:46

    It's overly clever code for turning on buffer flushing on handle s and then re-selecting the current handle.

    See perldoc -f select for more.

    0 讨论(0)
提交回复
热议问题