Exercises

  1. Write a program that encodes a file using the rot13 encoding scheme. In this scheme, each letter in the alphabet is replaced by the letter 13 places to the right. For example, “a” becomes “n,” “b” becomes “o,” “n” becomes “a,” “o” becomes “b,” and so on.

    Note that uppercase letters always map to uppercase letters, and lowercase letters always map to lowercase letters.

  2. A programmer uses the symbol QQQ to indicate debugging or temporary code. Write a program that searches files for this indicator and prints out any lines on which this symbol occurs. The program should print the filename followed by the line.

    The program should work for all the files on the command line. If no files are specified, <STDIN> should be used.

  3. Update the program ...

Get Perl for C Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.