That works!
In case you were curious about why it works: filehandles are STDOUT is line-buffered by default. This means that when you print, the output is buffered until (1) the buffer fills up or (2) you print a newline. Disabling buffering makes it output right away.
Update: correction as per ikegami's reply
In reply to Re^3: Newline vs Return
by revdiablo
in thread Newline vs Return
by DuaneCenveo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |