in reply to Pointers to formatting output

I see that you are looking for a way to 'capitalize' the first letter of every word? And also align the colon ':'? (You have to be more specific with your question next time, otherwise it becomes a game of 'spotting the difference' again. ;-)
my @text = ( "Project status :", "DB update :", "Some column :", ); my $max_line_width = 0; # capitalize the first letter of every word, and record # the maximum width of the lines seen. my @formatted_text = map { s/(\w+)/\u\L$1/g; $max_line_width = length if $max_line_width < length; $_ } @text; # insert spaces before the colon ':' to pad the string to # the maximum line width recorded my @formatted_text = map { substr($_, -1, 0) = ' ' x ($max_line_width - length); $_ } @formatted_text; print "$_\n" for @formatted_text;
And the output -
Project Status : Db Update : Some Column :