๐Ÿงช Perl MCQ Quiz Hub

Perl Mcq Question Set 1

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

Which function is used by perl for reversing a string?





โœ… Correct Answer: 2

Scalar stores





โœ… Correct Answer: 2

When you're pattern matching, you describe the pattern using





โœ… Correct Answer: 2

When the "require" function loads?





โœ… Correct Answer: 1

Which of the following statement repeats a statement or group of statements until a given condition becomes true. It tests the condition before executing the loop body?





โœ… Correct Answer: 2

Select comparison operator from the options.





โœ… Correct Answer: 3

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





โœ… Correct Answer: 3

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





โœ… Correct Answer: 4

Which of the following is used in perl?





โœ… Correct Answer: 3

Language which features rich text processing capabilities and flexibility is





โœ… Correct Answer: 1

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





โœ… Correct Answer: 3

Scalar is denoted by_______in Perl.





โœ… Correct Answer: 1

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





โœ… Correct Answer: 1

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





โœ… Correct Answer: 1

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





โœ… Correct Answer: 3

Which of these is NOT available for Perl





โœ… Correct Answer: 3

The "+=ย is which type of operator?





โœ… Correct Answer: 4

The getdir command





โœ… Correct Answer: 4

Select the option which allows the user to scroll through the entire program line by line in Perl.





โœ… Correct Answer: 2

What will be the value in the variable $a after these two statements: $a = "Happy"; $a = "Sunday";?





โœ… Correct Answer: 4

Which function is used by perl for displaying the length of a string?





โœ… Correct Answer: 4

When you create a variable, you may assume it starts off containing





โœ… Correct Answer: 3

Command line arguments in Perl are stored in





โœ… Correct Answer: 3

Which one of the following is the most powerful filter?





โœ… Correct Answer: 4

A perl program runs in a special interpretive mode.





โœ… Correct Answer: 1

To test whether perl is in your PATH, use ____





โœ… Correct Answer: 1

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





โœ… Correct Answer: 4

___ function is used for removing the last character from the line.





โœ… Correct Answer: 2

perl variables have no type and no initialization.





โœ… Correct Answer: 1

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





โœ… Correct Answer: 3

If a variable is undefined, its value is ____





โœ… Correct Answer: 1

Which of the following are concatenation operators?





โœ… Correct Answer: 2

To repeat a string, perl uses ___ operator.





โœ… Correct Answer: 3

___ function returns the first occurrence of a character in a string.





โœ… Correct Answer: 2

For extracting a substring, ____ function is used.





โœ… Correct Answer: 3

substr function is also used to alter an existing string.





โœ… Correct Answer: 1

Which function is used for handling substitutions in perl?





โœ… Correct Answer: 4

Which escape character is used for identifying a word character?





โœ… Correct Answer: 3

We can use find command for testing files with perl.





โœ… Correct Answer: 1

We can specify filenames in command line using perl.





โœ… Correct Answer: 1

Which of the following is referred to as default variable?





โœ… Correct Answer: 4

___ operator is used for selecting current line number.





โœ… Correct Answer: 3

___ is known as range operator.





โœ… Correct Answer: 1

The command @x=(1. .10) will assign first ten integer values to the array โ€˜aโ€™.





โœ… Correct Answer: 1

The ___ prefix to an array name signifies the last index of the array.





โœ… Correct Answer: 2

For deleting the elements from the left of the array ___ function is used.





โœ… Correct Answer: 4

For deleting the elements from the right of the array ___ function is used.





โœ… Correct Answer: 1

To add elements to the left side of the array ____ function is used.





โœ… Correct Answer: 4

To add elements to the right side of the array ____ function is used.





โœ… Correct Answer: 2

Which function can combine the functionalities of push, pop, unshift and shift?





โœ… Correct Answer: 1