Perl MCQs with answers Page - 9

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. STDIN in Perl stands for ___.

  • (A) Standard input output stream
  • (B) STandarD INput
  • (C) Solo input
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. Which of these is a decision-making statement in Perl?

  • (A) if
  • (B) unless
  • (C) if-else ladder
  • (D) All of these

A

Admin • 833.24K Points
Coach

Q. The code blocks unless the statement is executed when the condition is ___.

  • (A) True
  • (B) False
  • (C) ---
  • (D) ----

A

Admin • 833.24K Points
Coach

Q. Unless_elsif statement contains ___.

  • (A) elsif statement along with unless
  • (B) if nested inside unless
  • (C) unless nested inside elsif
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. Valid loops in Perl are ___.

  • (A) for
  • (B) foreach
  • (C) do while
  • (D) All of these

A

Admin • 833.24K Points
Coach

Q. foreach loop can iterate over __.

  • (A) List
  • (B) Integer
  • (C) Class
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. While in Perl is entry controlled?

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

A

Admin • 833.24K Points
Coach

Q. Until loop in Perl is ___.

  • (A) Opposite of while loop.
  • (B) Used to execute code when condition is false
  • (C) Entry controlled loop
  • (D) All of these

A

Admin • 833.24K Points
Coach

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

Code:
$a = 8;

until ($a <= 7){
    print "Value of a = $a
";
    $a = $a - 1;
}
  • (A) Value of a = 8
  • (B) Infinite loop
  • (C) No run
  • (D) None

A

Admin • 833.24K Points
Coach

Q. What is a given-when statement in Perl?

  • (A) loop
  • (B) Multiway branch statement
  • (C) function
  • (D) None 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