my $width = 6; for (qw(1001 1002 200)) { print "\r" . substr($_ . " " x $width, 0, $width); }