Day 17. Managing Files and Directories

On Day 15, we covered dealing with reading and writing files inside a Perl script. In today's lesson, we'll look at several other aspects of managing files—in particular, dealing with various aspects of the file system itself from inside your scripts. Here's what you learn about today:

  • Managing files: removing, renaming, copying and linking them, and changing permissions

  • Managing directories: navigating, creating, and removing them

  • Getting the contents of directories with file “globs” (a way to indicate groups of files quickly), and using directory handles.

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.