
- Perl - Home
- Perl - Introduction
- Perl - Environment
- Perl - Syntax Overview
- Perl - Data Types
- Perl - Variables
- Perl - Scalars
- Perl - Arrays
- Perl - Hashes
- Perl - IF...ELSE
- Perl - Loops
- Perl - Operators
- Perl - Date & Time
- Perl - Subroutines
- Perl - References
- Perl - Formats
- Perl - File I/O
- Perl - Directories
- Perl - Error Handling
- Perl - Special Variables
- Perl - Coding Standard
- Perl - Regular Expressions
- Perl - Sending Email
- Perl - Socket Programming
- Perl - Object Oriented
- Perl - Database Access
- Perl - CGI Programming
- Perl - Packages & Modules
- Perl - Process Management
- Perl - Embedded Documentation
- Perl - Functions References
- Perl Useful Resources
- Perl - Questions and Answers
- Perl - Quick Guide
- Perl - Cheatsheet
- Perl - Useful Resources
- Perl - Discussion
Perl Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Perl. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Q 1 - Which of the following data types are preceded by an "at" sign (@) in Perl?
Answer : B
Explanation
Arrays are preceded by an "at" sign (@).
Q 2 - Which of the following special variable represents current package name?
Answer : A
Explanation
_PACKAGE_ -represents current package name.
Q 3 - Which of the following method remove the elements of @ARRAY designated by OFFSET and LENGTH, and replaces them with LIST, if specified?
A - splice @ARRAY, OFFSET [ , LENGTH [ , LIST ] ]
B - split @ARRAY, OFFSET [ , LENGTH [ , LIST ] ]
Answer : A
Explanation
splice @ARRAY, OFFSET [ , LENGTH [ , LIST ] ] - This function will remove the elements of @ARRAY designated by OFFSET and LENGTH, and replaces them with LIST, if specified. Finally, it returns the elements removed from the array.
Q 4 - How will you get the size of a Hash?
Answer : A
Explanation
You can get the size − that is, the number of elements from a hash by using the scalar context on either keys or values.
Q 5 - Which of the following operator checks if the value of two operands are equal or not, if values are not equal then condition becomes true?
Answer : B
Explanation
!= − Checks if the value of two operands are equal or not, if values are not equal then condition becomes true.
Q 6 - Which of the following operator checks if the value of left operand is less than the value of right operand, if yes then condition becomes true?
Answer : A
Explanation
> − Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true.
Answer : D
Explanation
++ − Auto Increment operator increases integer value by one.
Answer : B
Explanation
-> − The arrow operator is mostly used in dereferencing a method or variable from an object or a class name.
Q 9 - Which of the following is true about Subroutine Call Context?
Answer : C
Explanation
Both of the above options are correct.
Q 10 - Which of the following function points current position of a pointer to a particular position in a file?
Answer : C
Explanation
You can use seek function to point a particular position inside the file.