Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Perl Idioms Explained - $|++

by NetWallah (Abbot)
on Aug 01, 2003 at 23:17 UTC ( #280188=note: print w/ replies, xml ) Need Help??


in reply to Perl Idioms Explained - $|++

Re: sauoq's comment:First, we don't need Yet-Another-Pair-Of-Constants-For-Zero-And-One.

I agree that it is ugly to have to declare those constants - If I had my way, they would be easily import-able, probably with use English;; but I do think it makes the code more readable/maintainable.

The objective is to allow moderately knowledgible perl-ites to be able to read the code, and be fairly confident that they understand it, without having to refer to a manual.

In this case, even using the name "$OUTPUT_AUTOFLUSH=1" does not clue the reader that his output is now UNBUFFERED. Hence, even with use English; (which is a good idea), I would still use the constants.


Comment on Re: Perl Idioms Explained - $|++
Replies are listed 'Best First'.
Re: Re: Perl Idioms Explained - $|++
by ctilmes (Priest) on Aug 01, 2003 at 23:23 UTC
    If they don't know that "AUTOFLUSH" flushes the output automatically, they probably don't know what the heck "UNBUFFERED" means.

    (And the converse -- if they have any clue what flushing is at all, they probably know what "AUTOFLUSH" means.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://280188]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (16)
As of 2015-07-31 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (279 votes), past polls