in reply to Adding to variable with sprintf()

Hi try this,

$ignore = 3; $page_data = "the cow jump over the moon"; @new1 = map{(length($_) > 3) ? $_ : (sprintf("%-5s", $_))} split(/\s+/ +, $page_data);