In Perl, a directory is used to store values in the form of lists. A directory is quite similar to a file. Just like a file, the directory also allows performing several operations on it. These operations are used for the modification of an existing directory or creation of a new one. A directory can be very easily opened and processed using the built-in function
It returns a list of files that match the expression passed in the argument. This function can print all or the specific files whose extension has been passed to it.
@list = <*>; // Prints all files in current directory
@list = glob(“*.pl”); // Prints all files in current directory with extension .pl
@list = glob(‘//GeeksforGeeks//Files//*); // Prints all files in the given path
Here are some examples that illustrate accessing a directory using
- How to copy a file from one directory to another using PHP ?
- How to check the given path is file or directory in node.js ?
- Perl | Appending to a File
- Perl | File Upload in CGI
- Perl | eof - End of File Function
- Perl | File Locking
- Perl | Reading a CSV File
- Perl | Writing to a File
- Perl | File I/O Functions
- Perl | Opening and Reading a File
- Perl | File Test Operators
- Perl | Useful File-handling functions
- Perl | Searching in a File using regex
- Perl | File Handling Introduction
- Copy the entire contents of a directory to another directory in PHP
- Perl Tutorial - Learn Perl With Examples
- Perl | Basic Syntax of a Perl Program
- How to Zip a directory in PHP?
- How to reset selected file with input tag file type in Angular 9?
- How to get file input by selected file name without path using jQuery ?