Perl MCQ Quiz Hub

Perl Mcq Question Set 3

Choose a topic to test your knowledge and improve your Perl skills

Which is the basic data type of Perl?





✅ Correct Answer: 2

How are scalars marked with?





✅ Correct Answer: 3

Which among the following are Scalars supported by Perl?





✅ Correct Answer: 4

Which operator is used to compare Strings in Perl?





✅ Correct Answer: 2

Which mong the following statements are/is true? S1: Attempting to use string operations on numbers will raise warnings S2: Attempting to use number operations on non-numeric strings will raise warnings





✅ Correct Answer: 2

Array References in Perl are _______





✅ Correct Answer: 1

Which is true with respect to Array References in Perl?





✅ Correct Answer: 1

Which operator is used to access the contents of Array References?





✅ Correct Answer: 2

Scalar Reference is used in which scenarios? S1: Disambiguate a file name from file content S2: Disambiguate returned content from a returned error string





✅ Correct Answer: 3

Which among the choices are/is false with respect to Arrays in Perl?





✅ Correct Answer: 4

Which of the following is not a sigil in Perl?





✅ Correct Answer: 3

Chhose the correct Statements: S1: Typeglobs are handled when dealing with files S2: Typeglob *foo holds references to the contents of global variables





✅ Correct Answer: 3

Under which scenario & sigil is not used in Perl?





✅ Correct Answer: 4

Which of the following acepts an expression in Perl?





✅ Correct Answer: 1

Which of the statements are false with respect to Hash References in perl? S1: Hash references are scalars S2: Any changes made within the subroutine will be made to the original hash





✅ Correct Answer: 4

In Perl, if the keys in Hash are not strings-then





✅ Correct Answer: 2

How to access an element of %hash?





✅ Correct Answer: 1

Which among the following helps to create hashes out of arrays?





✅ Correct Answer: 2

When does hashes becomes true if used as boolean?





✅ Correct Answer: 4

Which among the following esacpe sequence is not interpolated by Perl?





✅ Correct Answer: 4

Which among the following statements are true? S1: Double quotes interpolate the enclosed string S2: Single quotes interpolate the enclosed string





✅ Correct Answer: 1

Which of the following number evaluates to true in Perl?





✅ Correct Answer: 2

Which of the following Strings evaluates to false in Perl?





✅ Correct Answer: 3

use Time::Piece; is available in which version of Perl?





✅ Correct Answer: 4

How to create a new datetime?





✅ Correct Answer: 1

Which of the following conditional statements not supported by Perl?





✅ Correct Answer: 4

Which keyword is used to create Subroutines in Perl?





✅ Correct Answer: 1

When functions are to be treated as variables which sigil is mandatory?





✅ Correct Answer: 2

What does the function does not output when use Data::Show; is used in Perl?





✅ Correct Answer: 3

Which is false with respect to array and list relationship?





✅ Correct Answer: 4

Which of the following usage of List is not allowed in Perl?





✅ Correct Answer: 4

Choose the correct choice with respect to Perl S1: List can be assigned to hash s2: Hash can be used as list





✅ Correct Answer: 3

Which operator is used in comparator function to compare strings?





✅ Correct Answer: 4

Which operator is used in comparator function to compare numbers?





✅ Correct Answer: 1

Which of the following is not true with respect to Sorting in Perl? (Version > 5.16)





✅ Correct Answer: 3

What does the mode '>' write (trunc) does in Perl?





✅ Correct Answer: 2

What does the '+>' file operation denote in Perl?





✅ Correct Answer: 2

What does the '+>>' file operation denote in Perl?





✅ Correct Answer: 3

Which among the following enables faster file read?





✅ Correct Answer: 1