Blob


1 #!/usr/bin/perl
3 #Write a program that asks the user to enter a list of strings on separate
4 #lines, printing each string in a right-justified, 20-character column. To be
5 #certain that the output is in the proper columns, print a "ruler line" of
6 #digits as well. (This is simply a debugging aid.) Make sure that you're not
7 #using a 19-character column by mistake! For example, entering hello, good-bye
8 #should give output something like this:
10 #12345678901234567890123456789012345678901234567890
11 # hello
12 # good-bye
15 use v5.10;
16 use warnings;
17 use strict;
18 use utf8;
20 chomp(my @lines = <>);
21 print "1234567890"x7 ."\n";
22 printf "%20s\n"x@lines, @lines;