Hello!
#!/usr/bin/env perl
use warnings;
use strict;
my $text = 'hello ' x 30;
printf "%-20s : %s\n", 'very important text', $text;
the output of this script looks more ore less like this:
very important text : hello hello hello hello
hello hello hello hello hello hello hello hello
hello hello hello hello hello hello hello hello
...
but I would like an output like this:
very important text: hello hello hello hello
hello hello hello hello
hello hello hello hello
...
I forgot to mention: the text should have an open end in the sense that the right end of the textlines should align corresponding to the size of the terminal.
How could I change my script to reach my goal?