Workshop
The workshop provides quiz questions to help you solidify your understanding of the material covered and exercises to give you experience using what you've learned. Try to understand the quiz and exercise answers before you go on to tomorrow's lesson.
Quiz
1: | What do the following Perl switches do (with regard to one-liners):
-e -i -p |
A1: | The -e option runs a Perl script on the command line (a one-liner).
The -i option edits files in place; that is, the result of the script will be saved back to the original file. Any file extension argument to the -i option will be used to save the original version of the file. The -p option surrounds the Perl one-liner with a while (<>) loop with a print statement at the end. If you want to perform ... |
Get Sams Teach Yourself Perl in 21 Days, Second Edition 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.