http://www.perlmonks.org?node_id=1042055


in reply to Re: Bioinformatics project feedback request.
in thread Bioinformatics project feedback request.

The $|++ is a well known idiom; however, it works on the assumption that $| >= 0 is TRUE

No, it doesn't. It works on the little known fact that $| can only be 0 or 1. Try: $| = -1; print "$|\n";

Replies are listed 'Best First'.
Re^3: Bioinformatics project feedback request.
by kcott (Archbishop) on Jul 02, 2013 at 16:36 UTC

    Interesting. I certainly didn't know that and it's not documented in perlvar.

    $ perl -E '$| = 2; say $|; $| = -1; say $|; $| = 0; say $|; $| = undef +; say $|' 1 1 0 0

    Thanks for the information.

    -- Ken