Interview Questions

AJAX Interview Questions Android Interview Questions Angular 2 Interview Questions AngularJs Interview Questions Apache Presto Interview Questions Apache Tapestry Interview Questions Arduino Interview Questions ASP.NET MVC Interview Questions Aurelia Interview Questions AWS Interview Questions Blockchain Interview Questions Bootstrap Interview Questions C Interview Questions C Programming Coding Interview Questions C# Interview Questions Cakephp Interview Questions Cassandra Interview Questions CherryPy Interview Questions Clojure Interview Questions Cobol Interview Questions CodeIgniter interview Questions CoffeeScript Interview Questions Cordova Interview Questions CouchDB interview questions CSS Buttons Interview Questions CSS Interview Questions D Programming Language Interview Questions Dart Programming Language Interview Questions Data structure & Algorithm Interview Questions DB2 Interview Questions DBMS Interview Questions Django Interview Questions Docker Interview Questions DOJO Interview Questions Drupal Interview Questions Electron Interview Questions Elixir Interview Questions Erlang Interview Questions ES6 Interview Questions and Answers Euphoria Interview Questions ExpressJS Interview Questions Ext Js Interview Questions Firebase Interview Questions Flask Interview Questions Flex Interview Questions Fortran Interview Questions Foundation Interview Questions Framework7 Interview Questions FuelPHP Framework Interview Questions Go Programming Language Interview Questions Google Maps Interview Questions Groovy interview Questions GWT Interview Questions Hadoop Interview Questions Haskell Interview Questions Highcharts Interview Questions HTML Interview Questions HTTP Interview Questions Ionic Interview Questions iOS Interview Questions IoT Interview Questions Java BeanUtils Interview Questions Java Collections Interview Questions Java Interview Questions Java JDBC Interview Questions Java Multithreading Interview Questions Java OOPS Interview Questions Java Programming Coding Interview Questions Java Swing Interview Questions JavaFX Interview Questions JavaScript Interview Questions JCL (Job Control Language) Interview Questions Joomla Interview Questions jQuery Interview Questions js Interview Questions JSF Interview Questions JSP Interview Questions KnockoutJS Interview Questions Koa Interview Questions Laravel Interview Questions Less Interview Questions LISP Interview Questions Magento Interview Questions MariaDB Interview Questions Material Design Lite Interview Questions Materialize CSS Framework Interview Questions MathML Interview Questions MATLAB Interview Questions Meteor Interview Questions MongoDB interview Questions Moo Tools Interview Questions MySQL Interview Questions NodeJS Interview Questions OpenStack Interview Questions Oracle DBA Interview Questions Pascal Interview Questions Perl interview questions Phalcon Framework Interview Questions PhantomJS Interview Questions PhoneGap Interview Questions Php Interview Questions PL/SQL Interview Questions PostgreSQL Interview Questions PouchDB Interview Questions Prototype Interview Questions Pure CSS Interview Questions Python Interview Questions R programming Language Interview Questions React Native Interview Questions ReactJS Interview Questions RequireJs Interview Questions RESTful Web Services Interview Questions RPA Interview Questions Ruby on Rails Interview Questions SAS Interview Questions SASS Interview Questions Scala Interview Questions Sencha Touch Interview Questions SEO Interview Questions Servlet Interview Questions SQL Interview Questions SQL Server Interview Questions SQLite Interview Questions Struts Interview Questions SVG Interview Questions Swift Interview Questions Symfony PHP Framework Interview Questions T-SQL(Transact-SQL) Interview Questions TurboGears Framework Interview Questions TypeScript Interview Questions UiPath Interview Questions VB Script Interview Questions VBA Interview Questions WCF Interview Questions Web icon Interview Questions Web Service Interview Questions Web2py Framework Interview Questions WebGL Interview Questions Website Development Interview Questions WordPress Interview Questions Xamarin Interview Questions XHTML Interview Questions XML Interview Questions XSL Interview Questions Yii PHP Framework Interview Questions Zend Framework Interview Questions Network Architect Interview Questions

Top 30 Perl interview questions for 2020

1) What is Perl?

It is a programming language which is used for web development, system administration, GUI development and etc. It is also known as cross-platform programming language.

2) What are the Features of Perl?

The features of Perl are:
  • Simple object oriented programming syntax
  • Easily extendible
  • Open source modules
  • Supports third party databases
  • Cross platform language
  • Embeddable in other systems

3) What are the types of data types used in Perl?

The types of data types used in Perl are:
  • Scalars
  • Arrays
  • Hashes

4) What are the types of "Perl Operators"?

The types of Perl operators are:
  • String operators
  • Bitwise operators
  • Assignment operators
  • Numeric operators
  • Special operators
  • Comparison operators
  • Logical operators

5) What are types of Perl variables?

The variables used in Perl are:
  • Scalars
  • Arrays
  • Hashes

6) How many loop control keywords are there in Perl?

The loop control keywords in Perl are:
  • Redo
  • Next
  • Last

7) What are array functions in Perl?

It is used to add or remove some elements in an array. Four types of Perl array functions are:
  • Shift
  • Unshift
  • Push
  • Pop

8) Write a simple program in Perl to print "PERL EXPERT"?

Example
print "PERL EXPERT \n";

9) What will be the output of the following code snippet?

for ($count = 10; $count >= 1; $count--)  

 {  

 print "$count ";  

 }
OUTPUT: 10 9 8 7 6 5 4 3 2 1

10) Write a program in Perl to check the number is Even or Odd?

Example:
print "Enter a Number:\n";    

$num = <>;    

if( $num %2==0 ){    

printf "Even Number\n";    

}else{     

printf "Odd Number\n";    

}

11) What will be the output of the following code snippet?

use strict;  

use warnings;  

my $x = "Jaiswal";  

$y::x = "Atul";  

print "$y::x\n";  

print "$x\n";
OUTPUT: Atul Jaiswal

12) What is the use of the –w switch in Perl?

It is used to produce extra warning messages in Perl.

13) What are the types of Scalar functions used in Perl?

The types of Scalar Functions used in Perl are:
  • Defined
  • Undef
  • Ref
  • Reverse
  • Chomp
  • Chop
  • Index
  • Return

14) What are the types of Hash functions used in Perl?

The types of Hash Functions used in Perl are:
  • Exists
  • Delete
  • Sort
  • Values
  • Keys
  • Each
  • Hash length
  • Context

15) What will be the output of the following code snippet?

$a = 5;    

while($a < 150)  

{    

if( $a == 40 )  

{    

$a = $a + 10;    

redo;    

}    

print "a = $a\n";    

}  

continue  

{    

$a = $a * 2;    

}
OUTPUT:
a = 5
a = 10
a = 20
a = 50
a = 100

16) Who is the developer of Perl programming language?

Larry Wall is the developer of Perl programming language.

17) What is the file extension of Perl programming language?

.pl or .PL is the file extension of Perl programming language.

18) What are Hashes in Perl?

Hashes: They are unordered set of key and value pairs that you access using the keys as subscripts. Hashes are denoted by a percent (%) sign.

19) What is the use of sort() function in Perl?

sort() function: This function is used to sorts each element of an array according to the ASCII Numeric standards.

20) What is the full form of GMT?

GMT stands for Greenwich Mean Time.

21) What is the use of localtime() in Perl?

localtime(): It is a function which returns values for the current date and time if given no arguments.

22) What is the difference between gmtime() and localtime() functions?

gmtime() function: This function works similar to the localtime() function. gmtime() function return the universal Greenwich Mean Time (GMT). localtime() function: This function return the current local time on the machine.

23) What is Dereferencing in Perl?

Dereferencing: It returns the value from a reference point to the location. To dereference a reference, you can use $, @ or % as prefix of the reference variable.

24) Which feature of Perl provides code reusability?

Inheritance feature of Perl provides code reusability.

25) Can we load binary extension dynamically in Perl?

Yes, we can load binary extension dynamically in Perl.

26) What is the syntax to add two arrays together in Perl?

The syntax to add two arrays together in Perl is:
@arrayvar = (@array1,@array2);

27) What is the syntax of grep function in Perl?

The syntax of grep function in Perl is:
  1. grep BLOCK LIST
  2.  grep (EXPR, LIST)

28) Why Perl aliases are considered to be faster than references?

Perl aliases are faster than references because they do not require any dereferencing.

29) What are the prefix dereference available in Perl?

The prefix dereference available in Perl are:
@: denotes arrays

&: denotes subroutine

%: denotes Hash variables

$: denotes Scalar variables

30) Which keyword is used to call a subroutine?

&myvariable is used to call a subroutine.