August 5, 2021

Tag: Difference between the variables

Perl Interview Questions For Experienced
Perl

Perl Interview Questions For Experienced

Perl Interview Questions For Experienced 1. How do I generate a list of all .html files in a directory ? Ans: Here’s a snippet of code that just prints a listing of every file in the current directory that ends with the extension . html: #!/usr/bin/perl -w opendir(DIR, “.”); @files = grep(/\.html$/,readdir(DIR)); closedir(DIR); foreach $file […]

Read More
Perl Interview Questions & Answers Freshers
Perl

Perl Interview Questions & Answers Freshers

Perl Interview Questions & Answers Freshers 1. How to open and read data files with Perl? ¬†Ans: Data files are opened in Perl using the open () function. When you open a data file, all you have to do is specify (a) a file handle and (b) the name of the file you want to […]

Read More