Q. What is a number in Perl?

  • (A) Mathematical object for counting, measuring, and performing mathematical operations
  • (B) math module
  • (C) Non string type
  • (D) All of these
πŸ’¬ Discuss
βœ… Correct Answer: (A) Mathematical object for counting, measuring, and performing mathematical operations
Explanation: Number in Perl is a mathematical object for counting, measuring, and performing mathematical operations.

Q. Scalar is denoted by_______in Perl.

  • (A) #
  • (B) %
  • (C) $
  • (D) ^
πŸ’¬ Discuss
βœ… Correct Answer: (C) $

Q. In Perl, the words function and subroutines are used interchangeably

  • (A) True
  • (B) False
  • (C) All the above
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (A) True

Q. How do you perform a forward declaration of a subroutine performed?

  • (A) forward sub name
  • (B) sub name
  • (C) forward name
  • (D) sub name {
πŸ’¬ Discuss
βœ… Correct Answer: (A) forward sub name

Q. What will display the list of warning messages regarding the code?

  • (A) Strict pragma
  • (B) The -w Command-line argument
  • (C) Using the built-in debugger
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (C) Using the built-in debugger

Q. Which of these is NOT available for Perl

  • (A) Perl, legally, for free
  • (B) Individual and site licenses
  • (C) Full documentation of the language which you can print out yourself
  • (D) A Caribbean cruise in 2006 on which you can meet some of the Perl gurus
πŸ’¬ Discuss
βœ… Correct Answer: (C) Full documentation of the language which you can print out yourself

Q. The "+= is which type of operator?

  • (A) comparison operators
  • (B) Arithmetic operators
  • (C) Increment/ decrements operators
  • (D) Assignment operators
πŸ’¬ Discuss
βœ… Correct Answer: (D) Assignment operators

Q. The getdir command

  • (A) Reads a single file name from an open directory handle
  • (B) Reads the rest of the file names from an open directory handle
  • (C) Only works after anopendir command
  • (D) Is not a perl command
πŸ’¬ Discuss
βœ… Correct Answer: (D) Is not a perl command

Q. '%b' in the Perl output statement used to?

  • (A) Print backspace character
  • (B) Print binary of a number
  • (C) Print the statement in bold in web
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) Print binary of a number
Explanation: The "%b" character sequence is used to print the number's hexadecimal conversion.

Q. Which escape sequence is used to print hexadecimal of a number in Perl?

  • (A) %h
  • (B) %b
  • (C) %hex
  • (D) %x
πŸ’¬ Discuss
βœ… Correct Answer: (D) %x
Explanation: The "%x" character sequence is used to print the number's hexadecimal conversion.