Idiomatic? Needlessly obfuscated, I'd say, without even a gain in keystrokes. $|=1 takes four keystrokes, $|++ as well, but has more shifted keys. And it gives the false impression that you can turn buffering off by doing $| -- as often as you've given $| ++.
$| = 0; $| ++; $| ++; $| --; $| --; print $|; # prints 1, not 0!

If I were to code review production code, someone writing $| ++ instead of $| = 1 better have a pretty damn good reason for doing so.

Abigail


In reply to Re: What the heck does $|++; do? by Abigail-II
in thread What the heck does $|++; do? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":