Perl Interview Questions and Answers
Perl is an open source programming language generally developed for text manipulation, or we could say text editing. It is currently widely used for the task like web development, system administration, GUI development, network programming and more. Officially Perl does not have an acronym, but in backronyms people used it as Practical Extraction and Report Language. Are you for looking for Perl interview questions? As a Perl developer, you would want to know the best possible Perl interview questions and answers for freshers and experienced that you might be asked in your job Interview.
Advantages
- Perl is easy to understand
- Versatile and mature programming language.
- Perl is low cost as it available on MS-DOS , Windows NT, OS/2 etc.
- Its multipurpose language nature makes its work on Imperative, Procedural, Functional or Object Oriented, depends upon need.
Most Frequently Asked Perl Interview Questions
The grep function is used as a filter an array list that runs a regular expression and returns true and evaluated element.
Syntax @List = grep(Expression, @array)
.
- Arithmetic operators, +, - ,* etc
- Assignment operators: += , -+, *= etc
- Increment/ decrement operators: ++, --
- String concatenation: ‘.’ operator
- comparison operators: ==, !=, >, < , >= etc
- Logical operators: &&, ||
@sumarray = (@arr1,@arr2);
sub uniqueString {
return keys %{{ map { $_ => 1 } @_ }};
}
@array = ("perl", "php”, "per", "asp");
print join(" ", @array), "\n";
print join(" ", uniqueString(@array)), "\n";
$ is default input and pattern matching space variable in Perl.
Development History
Perl is developed by Larry Wall in 1987 and we currently we are using 5.28.1.