in reply to print to command line
If I understand correctly, you want something like:
print("\rProcessed line number $ctr.");
Test code:
for $ctr (1..10) { sleep(1); print("\rProcessed line number $ctr."); } print("\rDone. \n");
Similar to how "\n" (Line Feed) moves the cursor to the begining of the next line, "\r" (Carriage Return) moves the cursor to the begining of the current line.
|
|---|