Q.1
We can specify filenames in command line using perl.
  • a) True
  • b) False
Q.2
Which of the following is referred to as default variable?
  • a) $0
  • b) $1
  • c) $!
  • d) $_
Q.3
___ operator is used for selecting current line number.
  • a) $0
  • b) $1
  • c) $.
  • d) $_
Q.4
___ is known as range operator.
  • a) . .
  • b) $1
  • c) $.
  • d) $_
Q.5
The command @x=(.will assign first ten integer values to the array ‘a’.
  • a) True
  • b) False
Q.6
The ___ prefix to an array name signifies the last index of the array.
  • a) $0
  • b) $#
  • c) #$
  • d) $_
Q.7
For deleting the elements from the left of the array ___ function is used.
  • a) pop
  • b) push
  • c) queue
  • d) shift
Q.8
For deleting the elements from the right of the array ___ function is used.
  • a) pop
  • b) push
  • c) queue
  • d) shift
Q.9
To add elements to the left side of the array ____ function is used.
  • a) pop
  • b) push
  • c) queue
  • d) unshift
Q.10
To add elements to the right side of the array ____ function is used.
  • a) pop
  • b) push
  • c) queue
  • d) unshift
Q.11
Which function can combine the functionalities of push, pop, unshift and shift?
  • a) splice
  • b) add
  • c) delete
  • d) split
Q.12
For looping in a list, ____ is used.
  • a) for
  • b) fordo
  • c) foreach
  • d) while
Q.13
perl also supports use of for loop in the following manner. for($i=0;$i<3;$i++){ }
  • a) True
  • b) False
Q.14
For splitting a line or expression into fields, __ is used.
  • a) foreach
  • b) for
  • c) split
  • d) join
Q.15
___ function is used for joining lists.
  • a) foreach
  • b) for
  • c) split
  • d) join
Q.16
perl is ____ of grep, tr, sed and awk.
  • a) subset
  • b) superset
  • c) child
  • d) parent
0 h : 0 m : 1 s