The following Perl code reads and replace some text in a file. Two code snippets are provided to read a small file and a large file: Reading a Small File Reading a Large File
Problem Write a regular expression in Perl to validate dates in the following format “mm/dd/yyyy”. The month and day fields can be one or two digits. Code Here is a sample Perl code to do that
Problem Given the path to a directory. Write a Perl script to print the average time to open and read all files in that directory. The files should be read in blocks of 64 KB Solution This is straightforward problem but we need to pay attention to the fact that files can grow in size