Summary

In this chapter, we've reviewed and expanded on all the information you've learned about input and output so far in this book, taking what you already knew about reading from standard input and writing to standard output and using those same techniques to read and write from files.

Files and file handles were the focus of the start of this chapter, and you learned about using the open function to open a file and create a file handle to read from or write to that file. As an adjunct to open you also learned about die, a function that exits the script and prints an error message to the standard error file handle as it goes.

In the next part of the lesson, we talked about script arguments and switches: what happens when you call a script ...

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.