my $pad = ' ' x $wide; ... $_ = substr($_ . $pad, 0, $wide); print $_, "\r"; #### printf "%-${wide}.${wide}s\r", $_;