my $pad = ' ' x $wide; ... $_ = substr($_ . $pad, 0, $wide); print $_, "\r";