in reply to Overwriting printed text

Not sure about other systems, but many Unix terminals support a backspace character (chr(8)) to step back one, so you can space out a message by repeatedly printing backspace, space, backspace something like this:

my $clear = "\x08 \x08"; while (not $finished) { my $string = status(); print $string; # without a newline! do_more_stuff(); print $clear x length($string); }

Hugo