Blob


1 #!/usr/bin/perl
3 # Write a new program (*not* the test program!) that prints out any input
4 # line ending with whitespace (other than just a newline). Put a marker
5 # character at the end of the output line so as to make the whitespace
6 # visible.
8 use warnings;
9 use strict;
10 use utf8;
12 while (<>) {
13 chomp;
14 if (/\s+\z/) {
15 print ("Match: $_\$\n");
16 }
17 }