Exit demo 1D0-437 CIW PERL FUNDAMENTALS PDF format · free preview

CIW 1D0-437 - Questions & Answers

Free preview · every answer includes a full explanation

Product page: https://prepkeys.com/1d0-437.html

Question 1
Single choice

Which one of the following choices will assign the current package Library1?

A.

package::Library1;

B.

Library1::package;

C.

package(Library1);

D.

package Library1;

Question 2
Single choice

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");

Question 3
Single choice

Consider the following program code:

1.$x = 100;

2.$y = 15;

3.$result = $x % $y;

4.

5.print $result;

What is the result of executing this program code?

A.

The code will fail at line 3 because % is a unary operator.

B.

The code will output the following: 10E+16

C.

The code will output the following:

D.

The code will fail at line 5 because $result is not enclosed by parentheses.

Question 4
Single choice

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

B.

t tex

C.

t text

D.

t tex

Question 5
Single choice

Which one of the following choices uses the correct syntax for a valid array assignment?

A.

@cities = Akron, Memphis, Ogden, Phoenix;

B.

@cities =~ ("Akron, Memphis");

C.

@cities =~ (Akron, Memphis, Ogden, Phoenix);

D.

@cities = ("Akron");

Question 6
Single choice

Consider the following code:

$_ = "New York";

@array2 = split(//);

What is the value of $array2[0] after the code is executed?

A.

""

B.

"N e w"

C.

"NewYork"

D.

"N"

Question 7
Single choice

Running your Perl scripts with a d switch will perform which task?

A.

Invoke the Perl debugger

B.

Send standard error to a file

C.

Disable breakpoints

D.

Display a stack trace

Question 8
Single choice

Consider the following program code:

$x = 150;

$y = "250";

if (($x + 100) == $y) { print("1 "); }

if ("250" == $y) { print("2 "); }

if ("250" eq $y) { print("3 "); }

if ($x lt $y) { print("4 "); }

if ($x ge $y) { print("5 "); }

What is the result of executing this program code?

A.

The code will output the following: 1 2 3 4

B.

The code will output the following: 1 3 4

C.

The code will output the following: 1 3 5

D.

The code will output the following: 1 2 3 4 5

Question 9
Single choice

Which of the following choices demonstrates the proper way to close a database connection given that
$dbh is the database handle?

A.

Disconnect=>$dbh;

B.

disconnect $dbh;

C.

$dbh->disconnect;

D.

Close($dbh);

Question 10
Single choice

Which one of the following choices is a unary operator that can apply to only a single variable?

A.

++

B.

**

C.

/

D.

<?>?

Showing 10 of 149 questions · Unlock the full set