
- 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 type is suppported in Perl?
Answer : D
Explanation
All of the above data types are supported in Perl.
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 pops off and returns the last value of the array?
Answer : B
Explanation
pop @ARRAY - Pops off and returns the last value of the array.
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 operator checks if the value of two operands are equal or not, if yes then condition becomes true?
Answer : A
Explanation
== − Checks if the value of two operands are equal or not, if yes 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.
Q 7 - Which of the following operator returns true if the left argument is stringwise not equal to the right argument?
Answer : B
Explanation
ne − Returns true if the left argument is stringwise not equal to the right argument.
Q 8 - Which of the following is true about my operator?
B - Outside confined region , my variable cannot be used or accessed.
Answer : C
Explanation
The my operator confines a variable to a particular region of code in which it can be used and accessed. Outside that region, this variable cannot be used or accessed.
Q 9 - Which of the following function opens a file in writing mode after truncating the file?
Answer : B
Explanation
open(DATA, ">file.txt"); − opens a file in writing mode after truncating the file.
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.