![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Nice example! I prefer autoflush because the intent is much clearer than messing with the $| global variable. As an aside, it's a shame Perl was originally released with so many evil global variables because by the time lexical file handles made it into Perl 5.6 a host of unfortunate idioms were in common use, such as:
Of course, such old coding horrors like this can be expressed more clearly nowadays with a lexical file handle (see also):
For more examples of historic interface design boo-boos, see the Some Examples of Interface Mistakes section at: On Interfaces and APIs In reply to Re^2: The print is output later after die
by eyepopslikeamosquito
|
|