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 from inside the Perl script, and reading lists of the files inside a directory (either through the use of file globs or by reading from a directory handle.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset