Perl/Perl Mcq Question Set 1 Sample Test,Sample questions

Question:
 If a variable is undefined, its value is ____

1.0

2. 1

3.NULL

4.garbage

Posted Date:-2022-01-19 06:17:18


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

1.True

2.False

3.All the above

4.none of the above

Posted Date:-2022-01-19 05:28:54


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

1. .gp

2..sh

3..awk

4..pl

Posted Date:-2022-01-19 05:25:30


Question:
 substr function is also used to alter an existing string.

1.True

2.False

3.all of the above

4.asStub()

Posted Date:-2022-01-19 06:19:50


Question:
 The "+= is which type of operator?

1.comparison operators

2.Arithmetic operators

3.Increment/ decrements operators

4.Assignment operators

Posted Date:-2022-01-19 05:30:58


Question:
 The getdir command

1.Reads a single file name from an open directory handle

2.Reads the rest of the file names from an open directory handle

3.Only works after anopendir command

4.Is not a perl command

Posted Date:-2022-01-19 05:31:29


Question:
 To repeat a string, perl uses ___ operator.

1. /

2..

3.x

4.\

Posted Date:-2022-01-19 06:18:10


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

1.empty value

2.Array

3.Hash

4.Scalar

Posted Date:-2022-01-19 05:25:00


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

1.character

2.floating point number

3.number

4.boolean value

Posted Date:-2022-01-19 05:27:54


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

1.splice

2.add

3.delete

4.split

Posted Date:-2022-01-19 06:27:18


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

1.string

2.index

3. split

4. length

Posted Date:-2022-01-19 06:18:43


Question:
A perl program runs in a special interpretive mode.

1.True

2.False

3.all of the above

4.none of the above

Posted Date:-2022-01-19 06:13:12


Question:
Command line arguments in Perl are stored in

1.Scalar

2. Resource

3.Array

4.Hash

Posted Date:-2022-01-19 05:57:50


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

1. pop

2.push

3.queue

4.shift

Posted Date:-2022-01-19 06:24:47


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

1.pop

2.push

3.queue

4.shift

Posted Date:-2022-01-19 06:25:10


Question:
For extracting a substring, ____ function is used.

1.string

2.index

3.substr

4.length

Posted Date:-2022-01-19 06:19:30


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

1.forward sub name

2. sub name

3.forward name

4.sub name {}

Posted Date:-2022-01-19 05:29:26


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

1. .gp

2. .sh

3. .awk

4. .pl

Posted Date:-2022-01-19 06:14:04


Question:
Language which features rich text processing capabilities and flexibility is

1.Perl

2. C

3.Visual Basic

4.Ada

Posted Date:-2022-01-19 05:26:35


Question:
perl variables have no type and no initialization.

1.True

2.False

3.all of the above

4.none of the above

Posted Date:-2022-01-19 06:14:48


Question:
Scalar is denoted by_______in Perl.

1.#

2. $

3.%

4.^

Posted Date:-2022-01-19 05:28:28


Question:
Scalar stores

1.Multiple value

2.Single value

3.Double value

4. Float value

Posted Date:-2022-01-19 05:21:56


Question:
Select comparison operator from the options.

1. *=

2. &&

3.!=

4.=

Posted Date:-2022-01-19 05:24:28


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

1.Using the strict pragma

2.Using the built-in debugger

3.Using the string pragma

4.Using the built-in error

Posted Date:-2022-01-19 05:32:39


Question:
The command @x=(1. .10) will assign first ten integer values to the array ‘a’.

1.True

2. False

3.all of the above

4.none of the above

Posted Date:-2022-01-19 06:23:59


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

1.$0

2. $#

3. #$

4.$_

Posted Date:-2022-01-19 06:24:23


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

1.pop

2.push

3.queue

4.unshift

Posted Date:-2022-01-19 06:26:15


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

1.pop

2. push

3.queue

4. unshift

Posted Date:-2022-01-19 06:26:54


Question:
To test whether perl is in your PATH, use ____

1. perl -e

2.perl -i

3. perl -el

4. perl -ed

Posted Date:-2022-01-19 06:13:37


Question:
We can specify filenames in command line using perl.

1.True

2.False

3.all of the above

4.none of the above

Posted Date:-2022-01-19 06:22:25


Question:
We can use find command for testing files with perl.

1.True

2.False

3.all of the above

4.none of the above

Posted Date:-2022-01-19 06:21:09


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

1."Happy Sunday"

2."HappySunday"

3."Happy"

4."Sunday"

Posted Date:-2022-01-19 05:33:07


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

1.Strict pragma

2.The -w Command-line argument

3.Using the built-in debugger

4.none of the above

Posted Date:-2022-01-19 05:29:55


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

1.character

2. floating point number

3. number

4.boolean value

Posted Date:-2022-01-19 06:16:54


Question:
When the "require" function loads?

1.Runtime

2.Compile time

3.Both

4.none of the above

Posted Date:-2022-01-19 05:22:59


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

1.1

2.You may not make any assumption

3. The boolean value "false"

4.A null string (or 0 arithmetically)

Posted Date:-2022-01-19 05:34:04


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

1.A string in double quotes

2.A MySQL select statement

3.A regular expression

4.A template

Posted Date:-2022-01-19 05:22:22


Question:
Which escape character is used for identifying a word character?

1.s

2. d

3. w

4.

Posted Date:-2022-01-19 06:20:49


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

1.string

2.len

3.split

4.length

Posted Date:-2022-01-19 05:33:38


Question:
Which function is used by perl for reversing a string?

1.rev

2.reverse

3.split

4.substr

Posted Date:-2022-01-19 05:21:25


Question:
Which function is used for handling substitutions in perl?

1.tr

2.s

3.str

4. tr and s

Posted Date:-2022-01-19 06:20:23


Question:
Which of the following are concatenation operators?

1./

2. .

3._

4. \

Posted Date:-2022-01-19 06:17:46


Question:
Which of the following is referred to as default variable?

1.$0

2.$1

3.$!

4. $_

Posted Date:-2022-01-19 06:22:50


Question:
Which of the following is used in perl?

1.else if

2. elseif

3.elsif

4.elif

Posted Date:-2022-01-19 05:26:09


Question:
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?

1.while

2.until

3.for

4.none of the above

Posted Date:-2022-01-19 05:23:32


Question:
Which of these is NOT available for Perl

1.Perl, legally, for free

2.Individual and site licenses

3.Full documentation of the language which you can print out yourself

4.A Caribbean cruise in 2006 on which you can meet some of the Perl gurus

Posted Date:-2022-01-19 05:30:28


Question:
Which one of the following is the most powerful filter?

1. awk

2.grep

3. sed

4.perl

Posted Date:-2022-01-19 06:12:53


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

1.cut

2.chop

3.erase

4. split

Posted Date:-2022-01-19 06:14:29


Question:
___ is known as range operator.

1.. .

2. $1

3. $.

4. $_

Posted Date:-2022-01-19 06:23:40


Question:
___ operator is used for selecting current line number.

1.$0

2.$1

3.$.

4. $_

Posted Date:-2022-01-19 06:23:16


More MCQS

  1. Perl Mcq Question Set 1
  2. Perl Mcq Question Set 2
  3. Perl Mcq Questions Set 4
  4. Perl Mcq Question Set 3
  5. PERL Multiple Choice Questions Set 1
  6. PERL Multiple Choice Questions 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!