in reply to updating something in the same position

I always use "\r\e[0J", which will return the cursor to the start of the line and erase the characters on it.

but if you want more control try Term::ANSIScreen