my $w = 5; my $str = "abc"; my $line = sprintf "%*s", $w, $str; print "<", $line, ">\n"; __END__ < abc>