πŸ§ͺ Perl MCQ Quiz Hub

Perl Mcq Question Set 2

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

For looping in a list, ____ is used.





βœ… Correct Answer: 3

perl also supports use of for loop in the following manner. for($i=0;$i<3;$i++){ }





βœ… Correct Answer: 1

For splitting a line or expression into fields, __ is used.





βœ… Correct Answer: 3

___ function is used for joining lists.





βœ… Correct Answer: 4

perl is ____ of grep, tr, sed and awk.





βœ… Correct Answer: 2

The following will display : perl -e β€˜print β€œUNIX” x 10 . β€œ ” ;’





βœ… Correct Answer: 2

Perl scripts are text files.





βœ… Correct Answer: 1

The shebang line is _______





βœ… Correct Answer: 1

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





βœ… Correct Answer: 3

Perl is:





βœ… Correct Answer: 2

The printf format "%6.2f" displays a number …





βœ… Correct Answer: 1

The statement open (FH,"abc.txt");





βœ… Correct Answer: 2

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





βœ… Correct Answer: 4

Which brackets do you use to change the order of precedence of operations?





βœ… Correct Answer: 3

Which of the following tests if the string held in $qn includes the word "perl"?





βœ… Correct Answer: 2

Which of these is NOT available for Perl:





βœ… Correct Answer: 3

Perl was first released in:





βœ… Correct Answer: 4

What will be printed by the code below? 58% on 4261 times asked my $val = 'x'; print ref($val);





βœ… Correct Answer: 2

What is a file handle used for?





βœ… Correct Answer: 1

The "%" operator returns:





βœ… Correct Answer: 3

What is Perl?





βœ… Correct Answer: 1

. The $_ variable





βœ… Correct Answer: 4

The value of the expression $yards += 10





βœ… Correct Answer: 3

$x = @y[2 .. 4] assigns$x the third, fourth and fifth elements of the y array concatenated together.





βœ… Correct Answer: 2

Which of the following commands will turn a scalar ($str)into an array of characters?





βœ… Correct Answer: 3

<ARGV>





βœ… Correct Answer: 1

In Perl, a/n ________ is a special character or a sequence that will define the number of times the previous character or sequence appears.





βœ… Correct Answer: 4

In Perl, the following will result in which of the following, if the prize is currently "5 dollars" print 'You won $prize';





βœ… Correct Answer: 3

In Perl, which of the following are file handles?





βœ… Correct Answer: 3

In Perl, which switch is used for printing out warnings about typographical errors in your script?





βœ… Correct Answer: 4

In Perl, "stat" returns a thirteen element array with which of the following values?





βœ… Correct Answer: 3

CGI is a programming language.





βœ… Correct Answer: 1

In Perl, scalar variables always begin with a ________ sign.





βœ… Correct Answer: 4

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





βœ… Correct Answer: 3

. What will be printed by the code below? my @a = (0, 1, 2); my $b = @a; print $b;





βœ… Correct Answer: 4

What output will be generated by this statement: print("Hello world This is Perl ");?





βœ… Correct Answer: 3

What is the result of this script: $a = "This is Perl"; $b="This is Perl "; chomp($a); chomp($b);?





βœ… Correct Answer: 1

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





βœ… Correct Answer: 4

I want to write an appointment manager program for Microsoft Windows users. It must have a GUI, it must be very fast, and it depends on special GUI features found on only Microsoft Windows. What is the best language for the job?





βœ… Correct Answer: 3

There is another popular scripting language called Python. Like Perl, it reads and runs scripts in one step instead of compiling them ahead of time. What would I need on my computer to use Python?





βœ… Correct Answer: 4

Who designed and developed Perl?





βœ… Correct Answer: 1

Which are the permitted file extensions of perl?





βœ… Correct Answer: 3

PONIE is an acronym for?





βœ… Correct Answer: 4

Which symbol is owned by the Perl Foundation?





βœ… Correct Answer: 2

Which among the following statements are true with respect to Perl? S1: Perl is procedural in nature S2: Perl do automatic data-typing S3: All variables are marked with leading sigils





βœ… Correct Answer: 4

Which keyword can be used instead of print to have the carriage return added automatically? (v5.10 or higher)





βœ… Correct Answer: 3

Which option can be used to use perl on the command line?





βœ… Correct Answer: 1

How are single-line commented in Perl?





βœ… Correct Answer: 3

How are multi-line commented in Perl?





βœ… Correct Answer: 2

Which statement enables Plain Old Documentation?





βœ… Correct Answer: 1