in reply to print on one line
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?.
|
|---|