Perl was originally developed for the text processing like extracting the required information from a specified text file and for converting the text file into a different form. These operations can be performed by the use of various inbuilt file functions.
Following are some of the useful functions in Perl to work on Files:
|glob()||Used to print the files present in a directory passed to it as an argument|
|tell()||Used to get the position of the read pointer in a File with the use of its FileHandle|
|getc()||Used to read the next character from the file whose File Handle is passed to it as argument|
|reverse()||Returns the List in reverse order when used in List context and returns a concatenated string of the values of the List, with each character of the string in the opposite order when used in scalar context|
|rename()||Renames the old name of a file to a new name as given by the user|
- Perl | Useful Array functions
- Perl | Useful String functions
- Perl | File I/O Functions
- Perl | List Functions
- Perl | Subroutines or Functions | Set - 2
- Perl | Useful Hash functions
- Perl | Subroutines or Functions
- Perl | Useful Math functions
- Perl - Difference between Functions and Subroutines
- Perl | String functions (length, lc, uc, index, rindex)
- Perl | Basic Syntax of a Perl Program
- Perl Tutorial - Learn Perl With Examples
- Perl vs C/C++
- Perl | CGI Security
- Perl | qw Operator
- Perl | log() Function
- Introduction to Perl
- What is the difference between Perl and PHP ?
- Perl | oct() Function
- Perl | Operators | Set - 2
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.