Perl MCQs with answers Page - 4

Here, you will find a collection of MCQ questions on Perl. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. What will be printed by the code below? my $val = {}; print ref($val);

  • (A) empty value
  • (B) Array
  • (C) Hash
  • (D) Scalar

A

Admin • 833.24K Points
Coach

Q. It is often more convenient to save perl program files with ____ extension

  • (A) .gp
  • (B) .sh
  • (C) .awk
  • (D) .pl

A

Admin • 833.24K Points
Coach

Q. Which of the following is used in perl?

  • (A) else if
  • (B) elseif
  • (C) elsif
  • (D) elif

A

Admin • 833.24K Points
Coach

Q. Language which features rich text processing capabilities and flexibility is

  • (A) Perl
  • (B) C
  • (C) Visual Basic
  • (D) Ada

A

Admin • 833.24K Points
Coach

Q. When a string is used for numeral computations, perl converts it into

  • (A) character
  • (B) floating point number
  • (C) number
  • (D) boolean value

A

Admin • 833.24K Points
Coach

Q. Advantages of encapsulation are

  • (A) Data hiding
  • (B) Reusability
  • (C) Ease of testing
  • (D) All of these

A

Admin • 833.24K Points
Coach

Q. Which statement is used to enable strict mode in Perl?

  • (A) Strict mode;
  • (B) use strict;
  • (C) use strict mode;
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. Is boolean type provided in Perl?

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

A

Admin • 833.24K Points
Coach

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

A

Admin • 833.24K Points
Coach

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

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ