Mason%20(Perl)/Perl%20Programming%20MCQs%20Set%202 Sample Test,Sample questions

Question:
 Keys of the hash are extracted using?

1.Index

2.Using key function

3.Converting to array

4.None of These

Posted Date:-2022-11-27 09:26:51


Question:
 Length of string in Perl is calculated using ___.

1.len()

2.length()

3.size()

4.All of the these

Posted Date:-2022-11-27 09:45:03


Question:
 List context of the returned value from a subroutine is extracted using ___.

1.#

2.$

3.@

4.None of These

Posted Date:-2022-11-26 12:17:59


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

1.True

2.False

3.Error

4.None of these

Posted Date:-2022-11-26 12:24:32


Question:
 Which module is required to perform excel operation in Perl?

1.Excel::creator

2.Sheets::manager

3.Excel::Writer::XLSX

4.None of These

Posted Date:-2022-11-27 09:45:52


Question:
 Which of the following methods is used to display expressions in Perl?

1.cout()

2.say()

3.println()

4.None of the above

Posted Date:-2022-11-26 12:19:58


Question:
A built-in subroutine which is used inside the method is?

1.Mutable parameter

2.Trait

3.Method

4.All of these

Posted Date:-2022-11-26 12:14:09


Question:
Array in Perl created using?

1.%

2. @

3.$

4.None of these

Posted Date:-2022-11-27 09:21:45


Question:
Automatic end of line is added using which statement?

1.print()

2.clear()

3.say()

4.None of these

Posted Date:-2022-11-26 12:20:55


Question:
Can a given-when statement be nested in Perl?

1.Yes

2.No

3.Error

4.None of these

Posted Date:-2022-11-27 09:11:46


Question:
foreach loop can iterate over __.

1.List

2.Integer

3.Class

4.None of These

Posted Date:-2022-11-26 12:30:19


Question:
Immutable parameters in Perl are?

1.Special immutable string parameters passed to the function

2.Values that cannot be modified within the function

3. Values that can be modified within the function

4.None of these

Posted Date:-2022-11-26 12:06:31


Question:
Is it possible to pass file handles to subroutines in Perl?

1.Yes

2.No

3.Error

4.None of these

Posted Date:-2022-11-26 12:05:18


Question:
Is the goto statement in Perl used to ___.

1.Iterate over statements

2.Jump from anywhere to anywhere within the block

3.Create an entry point in program

4.None of these

Posted Date:-2022-11-27 09:12:58


Question:
Is the Redo operator in Perl used?

1.Create a loop

2.Jump the flow to the given label skipping the current block execution

3.Repeat current block evaluation

4.All of the above

Posted Date:-2022-11-27 09:14:11


Question:
Is the Scalar keyword in Perl is used to?

1.Create a scalar value

2.Convert expression to scalar context

3.Perform forceful evaluation to scalar

4.All of the these

Posted Date:-2022-11-27 09:40:05


Question:
Operations of Perl hashes are ___.

1.Accessing value

2.Updating value

3.Iteration

4.All of these

Posted Date:-2022-11-27 09:37:09


Question:
STDIN in Perl stands for ___.

1.Standard input output stream

2.STandarD INput

3.Solo input

4.None of these

Posted Date:-2022-11-26 12:22:55


Question:
The $ in Perl is used to create ___.

1.Hash

2.Array

3.Scalar

4.All of the these

Posted Date:-2022-11-27 09:38:01


Question:
The % sign in Perl is used to ___.

1.Declare a hash

2.Accessing a hash value

3.Initialize a loop

4.All of the above

Posted Date:-2022-11-27 09:19:09


Question:
The '==' operation is not valid on string in Perl?

1.True

2.False

3.Error

4.None of These

Posted Date:-2022-11-27 09:38:45


Question:
The 'It' operator of string is used to ___.

1.Concatenate string

2.Check if the string to its left is stringwise less than string to its left

3.Substitute text

4.None of these

Posted Date:-2022-11-27 09:43:18


Question:
The elements of the array are ___.

1.Number

2.String

3.Characters

4.All of the these

Posted Date:-2022-11-27 09:20:13


Question:
The print method in Perl return ___.

1.boolean value

2.string

3.char

4.None of These

Posted Date:-2022-11-26 12:21:50


Question:
The return() function in Perl is ___.

1.a subroutine from return package

2.return value at the end of subroutines

3.return named subroutine

4.None of these

Posted Date:-2022-11-26 12:17:16


Question:
Unless_elsif statement contains ___.

1.elsif statement along with unless

2.if nested inside unless

3.unless nested inside elsif

4.None of these

Posted Date:-2022-11-26 12:25:49


Question:
Until loop in Perl is ___.

1.Opposite of while loop.

2.Used to execute code when condition is false

3.Entry controlled loop

4.All of the these

Posted Date:-2022-11-26 12:32:58


Question:
Valid loops in Perl are ___.

1.for

2.foreach

3.do while

4.All of the mentioned

Posted Date:-2022-11-26 12:26:50


Question:
What are reference in Perl?

1.A way to access data with another variable

2.Referring a function

3.Class variable

4.None of these

Posted Date:-2022-11-26 12:15:48


Question:
What is a given-when statement in Perl?

1.loop

2.Multiway branch statement

3.function

4.None of these

Posted Date:-2022-11-27 09:11:08


Question:
What is a hash in Perl?

1.Set of key-value pair

2.Collection storing scalar

3.Collection sorting array

4.None of these

Posted Date:-2022-11-27 09:25:56


Question:
What is recursion in Perl?

1.Mechanism of a function calling itself again from its body

2.Looping over function with different values

3.Calling overloaded function

4.All of the these

Posted Date:-2022-11-26 12:19:09


Question:
What will be the output of the following Perl code?

$a = 8;

until ($a <= 7){
    print "Value of a = $a
";
    $a = $a - 1;
}

1.Value of a = 8

2.Infinite loop

3.No run

4.None

Posted Date:-2022-11-27 09:10:09


Question:
What will be the output of the following Perl code?%lang = ('Perl' => 4, 'Python' => 2, 'Javascript' => 5);
@arr = values %lang;
print @arr

1.PerlPythonJavascript

2. 245

3.425

4.None of these

Posted Date:-2022-11-27 09:35:50


Question:
Which is a valid way to extract the size of an array in Perl?

1._len(@array_name)

2.@array_name.length()

3.$size = scalar @array_name

4.All of the these

Posted Date:-2022-11-27 09:23:52


Question:
Which keyword is used to make the current iteration last one?

1.end

2.exit

3.last

4. None of these

Posted Date:-2022-11-27 09:15:18


Question:
Which of the following is a trait in Perl?

1.is cached

2.is rw

3.is copy

4.All of these

Posted Date:-2022-11-26 12:14:49


Question:
Which of these is a data type in Perl?





1.Scalars

2.Array

3.Hashes

4.All of these

Posted Date:-2022-11-27 09:15:59


Question:
Which of these is a decision-making statement in Perl?

1.if unless

2. if-else

3.ladder

4.All of the above

Posted Date:-2022-11-26 12:23:44


Question:
Which of these is a type of the scalar in Perl?

1.Array

2.String

3.Hash

4.All of these

Posted Date:-2022-11-27 09:17:38


Question:
Which of these types of string are interpolated?

1.Quote less

2.Single quoted

3.Double quoted

4.None of these

Posted Date:-2022-11-27 09:40:54


Question:
While in Perl is entry controlled?

1.Yes

2.No

3.Error

4.None of these

Posted Date:-2022-11-26 12:30:51


More MCQS

  1. Perl Programming MCQs Set 1
  2. Perl Programming MCQs Set 2
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!