Summer Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exc65

Consider the following program code:

@array = ("Y", "W", "X");

@array = sort(@array);

unshift(@array, "Z");

print(@array[0]);

What is the output of this code?

A.

W

B.

X

C.

Y

D.

Z

Which one of the following statements opens a file for appending?

A.

open(PASSWD, ">/etc/passwd");

B.

open(PASSWD ">/etc/passwd");

C.

open(PASSWD, ">>/etc/passwd");

D.

open(PASSWD "+>/etc/passwd");

Consider the program code in the attached exhibit. What is the result of executing this program code?

A.

The code will output the following:

3 4

B.

The code will output the following:

1 2 3 4

C.

The code will output the following:

1 2 4 5

D.

The code will output the following:

1 2 5

Consider the following command:

perl runme.pl arg1 arg2 arg3

Given this command issued on the command line, what is the value of $#ARGV?

A.

0

B.

1

C.

2

D.

3

Consider the following program code:

1.$x = 100;

2.$y = "-25";

3.$sum = $x + $y;

4.

5.print $sum;

What is the result of executing this program code?

A.

The code will output the following:

100-25

B.

The code will output the following:

75

C.

The code will fail at line 3 because $y contains string data.

D.

The code will output the following:

125

Consider the following assignments:

$x = 9

$y = 7

$z = 5

Given these assignments, which one of the following expressions evaluates as true?

A.

($x - $y) != ($y - $z);

B.

($z * 2) <= $x;

C.

($y + $z + $x) = $y*3;

D.

($x 2) > $y;

Which statement writes data to the filehandle OUTPUT?

A.

print "Here's my data.\n" > OUTPUT

B.

write OUTPUT "Here's my data.\n";

C.

write OUTPUT ">Here's my data.\n";

D.

print OUTPUT "Here's my data.\n";

Consider that a file named test.txt contains this line of text:

One line of test text.

What is the output of the following lines of code?

$file = "test.txt";

open (OUT, "<$file") || (die "cannot open $file: $!");

seek(OUT, 15, 0);

read(OUT, $buffer, 5);

print $buffer . "\n";

print tell(OUT);

A.

t text

20

B.

t tex

19

C.

t text

19

D.

t tex

20

Consider the following statement:

@array1 = (9, "A", 0..9, "PERL");

Given this statement, @array1 consists of how many elements?

A.

13

B.

4

C.

12

D.

16

Which one of the following choices will replace all occurrences of the word perl with the word Perl?

A.

s/Perl/perl/I;

B.

s/"perl"/"Perl"/g;

C.

s/"perl"/"Perl"/;

D.

s/perl/Perl/g;