3 #Modify the previous program to let the user choose the column width, so that
4 #entering 30, hello, good-bye (on separate lines) would put the strings at the
5 #30th column. (Hint: see "Interpolation of Scalar Variables into Strings" on
6 #page 32, about controlling variable interpolation.) For extra credit, make the
7 #ruler line longer when the selected width is larger.
14 chomp(my @lines = <>);
15 my $width = shift @lines;
17 print "1234567890"x($width/10 + 1) ."\n";
19 print "1234567890"x7 ."\n";
21 printf "%${width}s\n"x@lines, @lines;