- 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, 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 method splits a string into an array of strings, and returns it?
A - splice @ARRAY, OFFSET [ , LENGTH [ , LIST ] ]
B - split @ARRAY, OFFSET [ , LENGTH [ , LIST ] ]
Answer : B
Explanation
split [ PATTERN [ , EXPR [ , LIMIT ] ] ] - This function splits a string into an array of strings, and returns it. If LIMIT is specified, splits into at most that number of fields. If PATTERN is omitted, splits on whitespace.
Q 4 - Which of the following function returns true if the named key exists in a Hash?
Answer : B
Explanation
exists − exists function, which returns true if the named key exists, irrespective of what its value might be.
Q 5 - Which of the following statement repeats a statement or group of statements until a given condition becomes true. It tests the condition before executing the loop body?
Answer : B
Explanation
until loop − Repeats a statement or group of statements until a given condition becomes true. It tests the condition before executing the loop body.
Q 6 - Which of the following operator checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true?
Answer : D
Explanation
> − Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true.
Answer : A
Explanation
. − Binary operator dot (.) concatenates two strings.
Q 8 - Which of the following is correct about lexical variables?
A - Lexical variables are private variables created using my operator.
Answer : A
Explanation
Lexical variables are private variables created using my operator.
Q 9 - Which of the following operator is used when the current value of a variable must be visible to called subroutines?
Answer : B
Explanation
The local is used when the current value of a variable must be visible to called subroutines.
Q 10 - Which of the following code create a reference for a hash?
Answer : C
Explanation
You can create a reference for any hash by prefixing it with a backslash as follows - $ref = \%ENV;
To Continue Learning Please Login
Login with Google