in reply to Re: Re: Cheap idioms
in thread Cheap idioms
Ah, but you're wrong. In a simple list, as perlop explicitly states, operands are evaluated left-to-right. Otherwise, you couldn't write
print("Done.\n"), exit if $done;
either, but we all know that it works, right? Your example is problematic because is uses pre- and postincrement operators which mess with the order of side effects.
IO::Handle loads over 1,000 lines of code - if it's just for a single autoflush, what's the point? Especially seeing as the select idiom is known and even delivered with the perldocs, it's safe to assume it isn't cryptic.
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re^3: Cheap idioms
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