Blob


1 #!/usr/bin/perl
3 # Write a program that reads a list of strings on separate lines
4 # until end-of-input and prints out the list in reverse order. if
5 # the input comes from the keyboard, you'll probably need to signal
6 # the end of the input by pressing Control-D on Unix, or Control-Z
7 # on Windows.
9 use warnings;
10 use strict;
11 use utf8;
13 print "Type your input. Once finished, type ^d:\n";
14 my @lines = <STDIN>;
15 @lines = reverse @lines;
16 print @lines;