- 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
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 is correct about Perl?
A - Perl can handle encrypted Web data, including e-commerce transactions.
Answer : D
Explanation
All of the above options are correct.
Q 2 - Which of the following special variable represents current line number?
Answer : C
Explanation
_LINE_ -represents current line number.
Q 3 - Which of the following is correct about Hashes?
A - A hash is a set of key/value pairs.
Answer : D
Explanation
All of the above options are correct.
Q 4 - Which of the following statement restarts the loop block without evaluating the conditional again?
Answer : D
Explanation
redo statement − The redo command restarts the loop block without evaluating the conditional again. The continue block, if any, is not executed.
Q 5 - Which of the following statement expects the expression to return a label name and then jumps to that labeled statement?
Answer : B
Explanation
goto EXPR − The goto EXPR form is just a generalization of goto LABEL. It expects the expression to return a label name and then jumps to that labeled statement.
Q 6 - Which of the following operator checks if the value of two operands are equal or not, and returns -1, 0, or 1?
Answer : C
Explanation
<=> − Checks if the value of two operands are equal or not, and returns -1, 0, or 1 depending on whether the left argument is numerically less than, equal to, or greater than the right argument.
Q 7 - Which of the following operator returns a string consisting of the left operand repeated the number of times specified by the right operand?
Answer : B
Explanation
x − The repetition operator x returns a string consisting of the left operand repeated the number of times specified by the right operand.
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 is true about state variables?
B - These variables are defined using the state operator and available starting from Perl 5.9.4.
Answer : C
Explanation
Both of the above options are correct.
Q 10 - Which of the following function returns current position of a pointer in a file?
Answer : B
Explanation
You can use tell function to know the current position of a file.
To Continue Learning Please Login
Login with Google