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 :)
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Cheap idioms
by Aristotle (Chancellor) on Oct 14, 2002 at 14:35 UTC | |
by Sihal (Pilgrim) on Oct 14, 2002 at 18:46 UTC | |
by Aristotle (Chancellor) on Oct 15, 2002 at 09:34 UTC | |
by Sihal (Pilgrim) on Oct 15, 2002 at 12:31 UTC |
In Section
Meditations