Blob
1 #!/usr/bin/perl3 # Write a program that reads a list of strings on separate lines4 # until end-of-input and prints out the list in reverse order. if5 # the input comes from the keyboard, you'll probably need to signal6 # the end of the input by pressing Control-D on Unix, or Control-Z7 # 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;