- 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 - In which of the following variable context, assignment to a scalar variable evaluates the right-hand side in a scalar context?
Answer : A
Explanation
Scalar − Assignment to a scalar variable evaluates the right-hand side in a scalar context.
Q 3 - Which of the following method sorts the LIST and returns the sorted array value?
Answer : D
Explanation
sort [ SUBROUTINE ] LIST − This function sorts the LIST and returns the sorted array value. If SUBROUTINE is specified then specified logic inside the SUBTROUTINE is applied while sorting the elements.
Q 4 - Which of the following statement terminates the loop statement and transfers execution to the statement immediately following the loop?
Answer : B
Explanation
last statement − Terminates the loop statement and transfers execution to the statement immediately following the loop.
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 returns true if the left argument is stringwise equal to the right argument?
Answer : A
Explanation
eq − Returns true if the left argument is stringwise equal to 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 function returns the universal Greenwich Mean Time, or GMT (or UTC)?
Answer : B
Explanation
gmtime − returns the universal Greenwich Mean Time, or GMT (or UTC).
Q 9 - Which of the following function opens a file in writing mode without truncating the file?
Answer : C
Explanation
open(DATA, "+<file.txt"); − opens a file in writing mode without 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.