
- Perl Basics
- 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 Advanced
- 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 - Useful Resources
- Perl - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 - In which of the following variable context, an expression is being evaluated to see whether it's true or false?
Answer : C
Explanation
Boolean − Boolean context is simply any place where an expression is being evaluated to see whether it's true or false.
Q 3 - Which of the following is correct about $[ Special Variable?
A - This special variable is a scalar containing the first index of all arrays.
B - Because Perl arrays have zero-based indexing, $[ will almost always be 0.
Answer : D
Explanation
All of the above options are correct.
Q 4 - How will you delete a key/value pair to a hash?
Answer : B
Explanation
To remove an element from the hash you need to use delete function.
Q 5 - Which of the following statement executes a sequence of statements multiple times and abbreviates the code that manages the loop variable?
Answer : C
Explanation
for loop − Executes a sequence of statements multiple times and abbreviates the code that manages the loop variable.
Q 6 - Which of the following operator returns true if the left argument is stringwise greater than the right argument?
Answer : B
Explanation
gt − Returns true if the left argument is stringwise greater than the right argument.
Q 7 - Which of the following operator returns a list of values counting (up by ones) from the left value to the right value?
Answer : C
Explanation
.. − The range operator .. returns a list of values counting (up by ones) from the left value to the right value.
Q 8 - Parameters of a function can be acessed inside the function using the special array @_?
Answer : A
Explanation
Parameters can be acessed inside the function using the special array @_. Thus the first argument to the function is in $_[0], the second is in $_[1], and so on.
Q 9 - Which of the following is true about Perl references?
B - Because of its scalar nature, a reference can be used anywhere, a scalar can be used.
Answer : C
Explanation
Both of the above options are correct.
Q 10 - Which of the following function returns a single character from the specified FILEHANDLE, or STDIN if none is specified?
Answer : B
Explanation
The getc function returns a single character from the specified FILEHANDLE, or STDIN if none is specified.