πŸ“Š Perl
Q. Immutable parameters in Perl are?
  • (A) Special immutable string parameters passed to the function
  • (B) Values that cannot be modified within the function
  • (C) Values that can be modified within the function
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) Values that cannot be modified within the function

Explanation: Immutable parameters in Perl are values that cannot be modified within the function.

πŸ“Š Perl
Q. A built-in subroutine which is used inside the method is?
  • (A) Mutable parameter
  • (B) Trait
  • (C) Method
  • (D) All of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) Trait

Explanation: Trait is a built-in subroutine which is used inside the method.

πŸ“Š Perl
Q. Which of the following is a trait in Perl?
  • (A) is cached
  • (B) is rw
  • (C) is copy
  • (D) All of these
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of these

Explanation: Trait in Perl is:

is cached
is rw
is copy

πŸ“Š Perl
Q. What are reference in Perl?
  • (A) A way to access data with another variable
  • (B) Referring a function
  • (C) Class variable
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (A) A way to access data with another variable

Explanation: Reference in Perl is a way to access data with another variable.

πŸ“Š Perl
Q. The return() function in Perl is ___.
  • (A) a subroutine from return package
  • (B) return value at the end of subroutines
  • (C) return named subroutine
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) return value at the end of subroutines

Explanation: The return() function in Perl is used to return values at the end of subroutines.

πŸ“Š Perl
Q. List context of the returned value from a subroutine is extracted using ___.
  • (A) #
  • (B) $
  • (C) @
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) @

Explanation: The @ is used to return the list context of the returned value from a subroutine.

πŸ“Š Perl
Q. What is recursion in Perl?
  • (A) Mechanism of a function calling itself again from its body
  • (B) Calling overloaded function
  • (C) Looping over function with different values
  • (D) All of these
πŸ’¬ Discuss
βœ… Correct Answer: (A) Mechanism of a function calling itself again from its body

Explanation: Recursion is a mechanism of a function calling itself again from its body.

πŸ“Š Perl
Q. Which of the following methods is used to display expressions in Perl?
  • (A) cout()
  • (B) say()
  • (C) println()
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) say()

Explanation: The say() method is used to display expressions in Perl.

πŸ“Š Perl
Q. Automatic end of line is added using which statement?
  • (A) print()
  • (B) clear()
  • (C) say()
  • (D) All of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) say()

Explanation: The say() method is used to display expressions in Perl. It automatically adds the end of line after print.

πŸ“Š Perl
Q. The print method in Perl return ___.
  • (A) boolean value
  • (B) string
  • (C) char
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (A) boolean value

Explanation: The return type of Perl method is boolean.