Category: | Miscellaneous |
Author/Contact Info | RMGir |
Description: | I do a lot of one-liners, and often want Autoflush turned on.
But typing for each is a bit of a pain, so I wrote this so I can do instead. I could always do but that's probably very inefficient. The name is short, since calling it "Acme::Autoflush" would pretty well defeat the purpose. |
package AF; # that's all there is to this module; we just # want STDOUT to autoflush. If a different # handle is selected when we get here, well, # too bad =) # As merlyn pointed out, I didn't need a BEGIN here... $|=1; # USAGE: perl -MAF -ne'whatever-you-want' # or # perl -MAF -pe'whatever' # I don't even need this 1, since the result of the # assignment is 1, but I think it's cleaner to leave this # in 1; |
|
---|
Replies are listed 'Best First'. | |
---|---|
•Re: Simple autoflush module
by merlyn (Sage) on Aug 12, 2002 at 19:10 UTC | |
by RMGir (Prior) on Aug 12, 2002 at 19:29 UTC | |
Re: Simple autoflush module
by BrowserUk (Patriarch) on Aug 13, 2002 at 04:50 UTC | |
by RMGir (Prior) on Aug 13, 2002 at 11:21 UTC | |
Re: Simple autoflush module
by robobunny (Friar) on Aug 12, 2002 at 22:16 UTC | |
by RMGir (Prior) on Aug 12, 2002 at 23:34 UTC |
Back to
Code Catacombs