Perl | Useful File-handling functions
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.
"Character read from the file is $ch"
Following are some of the useful functions in Perl to work on Files:
||Used to print the files present in a directory passed to it as an argument
||Used to get the position of the read pointer in a File with the use of its FileHandle
||Used to read the next character from the file whose File Handle is passed to it as argument
||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
||Renames the old name of a file to a new name as given by the user
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!