perl -le '$\="";$|=1;$cnt=5; for (0..$cnt){print "*";sleep 1;}'
Note I have also modified the special variable $| ($OUTPUT_AUTOFLUSH) - this modifies the flush behavior of the file handles. For a discussion of why, see Suffering from Buffering?.
In reply to Re: print on one line
by kennethk
in thread print on one line
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |