Site menu:

Perl Quiz 3

Questions on Perl Fundamentals   ( Perl Quiz 1 | Perl Quiz 2 )
 

 
You are at question 1 of 25:

Hexadecimal (base 16) integer literals start with a










You are at question 2 of 25:

What is the output of the following program?

my $str = '15 Apples' * 3;
print $str;










You are at question 3 of 25:

What is the output of the following program?

my $str = 'galileo' * 5;
print $str;










You are at question 4 of 25:

What is the output of the following program?

my @scientists = qw/einstein galileo edison newton/;
my $number = 2.64283;
print $scientists[$number - 1];










You are at question 5 of 25:

What is the output of the following program?

my @scientists = qw/Curie Newton Archimedes Aristotle/;
print $scientists[-4];










You are at question 6 of 25:

What is the output of the following program?

my @nums = 2.9 .. 9.4;
print "@nums";










You are at question 7 of 25:

What is the output of the following program?

my($scientist1, $scientist2) = qw/Galileo Einstein Newton Edison/;
print $scientist2;










You are at question 8 of 25:

What is the output of the following program?

my($scientist1, $scientist2) = qw/Newton/;
print $scientist2;










You are at question 9 of 25:

What is the output of the following program?

my $scientist;
my @scientists = qw/Einstein Galileo Newton Edison/;
foreach $scientist (@scientists) {
$scientist = "$scientist\n";
}
print $scientist;










You are at question 10 of 25:

What is the output of the following program?

my @cities = qw/paris london tokyo rome/;
foreach my $city (@cities) {
$city = uc $city;
}
print "@cities";










You are at question 11 of 25:

The function 'sort' in scalar context always return










You are at question 12 of 25:

if (something) {...} works on which context?










You are at question 13 of 25:

Starting with Perl 5.12 the 'each' operator on arrays return










You are at question 14 of 25:

'print something' falls under which context?










You are at question 15 of 25:

'while (something) {...}' falls under which context?










You are at question 16 of 25:

In Perl the semicolon is a










You are at question 17 of 25:

How many variable namespaces (package variables) are there in Perl?










You are at question 18 of 25:

Which of these arguments does the shift function takes when it is outside of the subroutine/function?










You are at question 19 of 25:

'given-when' statement was introduced in Perl version










You are at question 20 of 25:

In regular expression the \Z anchor matches










You are at question 21 of 25:

Find out the incorrect statement










You are at question 22 of 25:

What is the output of the following program?

my $result = ( 10 >= 4 ) || ( 2 < 15 );
print $result;










You are at question 23 of 25:

What is the output of the following program?

my $result = ( 10 < 4 ) or ( 2 < 15 );
print $result;










You are at question 24 of 25:

qx// stands for










You are at question 25 of 25:

The POD command '=cut'










Status Bar