Summary

No Perl script is an island. At some point, chances are good your script is going to need to peek outside at the world of the file system, particularly if your script reads and writes extensively from files. On Day 15, you learned how to read and write the contents of the files themselves; today, we covered how to handle the bigger issues of file and directory management from inside Perl scripts.

We started with files: renaming them, linking them, and moving them as you might outside your script with a command line or iconic file manager.

If you can manage files, you must be able to manage directories. And so, in the second half of this lesson, we discussed creating and removing directories, printing and changing the current working directory ...

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.