This places the cursor at the end of the line not at the start. In this small example this does not make any difference but if the loop takes a second or so to process the cursor will be visible. Also following lines would overwrite the last line otherwise, which is not always wanted.print "\r$_/5" foreach (1..5); # and then: print "\n"; # or print ' 'x10, "\n";
In reply to Re^2: how to erase screen output?
by mscharrer
in thread how to erase screen output?
by llancet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |