in reply to Re: Cheap idioms
in thread Cheap idioms
select( ( select(STDOUT), $| = 1 )[0] );
This only works if the inner select is evaluated before the assignment is, and I can't find any specification of evaluation order (remember ++$a, $a++, ++$a?)
That's why I don't dare to use this idiom, although I see it often. I still prefer STDOUT->autoflush(1) (using IO::Handle). It's shorter too :)
In Section
Meditations