Day 15. Working with Files and I/O

Throughout the first two weeks of this book, I introduced you to input and output (otherwise known as I/O) a little at a time. You've learned about standard input and output using <STDIN> and print, and about file input using the command line, the <> operator, and a while loop to automatically assign each line to the $_ variable.

In today's lesson, we'll expand on what you already know about input and output in greater detail, as well as touch more on script argument lists and getting data and options into your script. Today, we'll explore

  • All about file handles: creating them, reading input from them, writing output to them

  • Simple file tests for finding out information about a particular file

  • Working with script ...

Get Sams Teach Yourself Perl in 21 Days, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.