Perl MCQs with answers Page - 5

Dear candidates you will find MCQ questions of Perl here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question

T

Team MCQ Buddy • 20.45K Points
Instructor III

Q. Is boolean type provided in Perl?

  • (A) Yes
  • (B) No
  • (C) ---
  • (D) ---

T

Team MCQ Buddy • 20.45K Points
Instructor III

Q. What will be the output of the following Perl code?

Code:
$m = 2;

if ($m){
    print "True";
}
else{
    print "False";
}
  • (A) True
  • (B) False
  • (C) Error
  • (D) None of these

T

Team MCQ Buddy • 20.45K Points
Instructor III

Q. Which of these is the 'True' value in Perl?

  • (A) ""
  • (B) 0
  • (C) 5
  • (D) All of these

T

Team MCQ Buddy • 20.45K Points
Instructor III

Q. Which of the following is a type of operator in Perl?

  • (A) Arithmetic Operator
  • (B) Relational Operator
  • (C) Ternary Operator
  • (D) All of these

T

Team MCQ Buddy • 20.45K Points
Instructor III

Q. Logical operators in Perl are ___.

  • (A) Used to compare values
  • (B) Used to combine conditions
  • (C) Used to perform arithmetic operations
  • (D) None of these

T

Team MCQ Buddy • 20.45K Points
Instructor III

Q. The result of the following operation is

Code:
100 << 3
  • (A) 001
  • (B) 300
  • (C) 800
  • (D) Error

T

Team MCQ Buddy • 20.45K Points
Instructor III

Q. Which of the following is a valid assignment operator in Perl?

  • (A) =
  • (B) ==
  • (C) +=
  • (D) %=

T

Team MCQ Buddy • 20.45K Points
Instructor III

Q. What will be the output of the following Perl code?

Code:
$val1 = 5;
$val2 = 10;

$result = $val1 == $val2 ? $val1 : $val2;

print "$result"
  • (A) 5
  • (B) 15
  • (C) 10
  • (D) 20

T

Team MCQ Buddy • 20.45K Points
Instructor III

Q. 'x' operator on string used to?

  • (A) Add x character to the string
  • (B) Repeat the given string multiple times
  • (C) Add two strings
  • (D) None of these

T

Team MCQ Buddy • 20.45K Points
Instructor III

Q. Is auto increment/ decrement operator valid in Perl?

  • (A) Yes
  • (B) No
  • (C) ---
  • (D) ---

Download our easy to use, user friendly Android App from Play Store. And learn MCQs with one click.

Image

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.