Skip to content

Tag Archives: Perl-files

File handling in Perl is used to read data from an external file or to write data into an external file. This is very useful… Read More
Write a Perl program to display contents of the file in sorted order(ascending) based on line numbers given via command-line arguments. Note that the line… Read More
In Perl, we can easily compare the content of two files by using the File::Compare module. This module provides a function called compare, which helps… Read More
For traversing a directory tree in Perl, there are several ways/methods. Traversing can be performed through function calls opendir and readdir which are a part… Read More
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… Read More
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… Read More
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… Read More
The File::Slurp module is used to read contents of a file and store it into a string. It is a simple and efficient way of… Read More
tell() function in Perl is used to get the position of the read pointer in a File with the use of its FileHandle. If no… Read More
getc() function in Perl is used to read the next character from the file whose File Handle is passed to it as argument. If no… Read More
In Perl, a FileHandle associates a name to an external file, that can be used until the end of the program or until the FileHandle… Read More
Excel files are the most commonly used office application to communicate between computers. It is used to create rows and columns of text, numbers, and… Read More
A filehandle is a variable that is used to read and write to a file. This filehandle gets associated with the file. In order to… Read More
When a file is opened in write mode using “>”, the content of the existing file is deleted and content added using the print statement… Read More
A filehandle is an internal Perl structure that associates a physical file with a name. All filehandles have read/write access, so once filehandle is attached… Read More