cmd, shell

Perl autoflush

 $ perl -e '$|=1; while(<>){print "you entered: $_";}'

Even though in the above code it is irrelevant, the $|=1 assignment makes all the output be unbuffered (auto-flushed). This is quite useful in sockets, network protocols and IPC.

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*Required Fields