in reply to Outputing a simple counter to stdout on the same line.
$|=1; for (1..3){ print "\r$_";sleep 1; } [download]