Labour Day Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: scxmas70

1D0-437 Exam Dumps - CIW PERL FUNDAMENTALS

Question # 4

Regular expressions are best used for which task?

A.

To perform arithmetic functions

B.

To determine whether a string matches a specific pattern

C.

To perform spelling checks within text files

D.

To output data to a text file

Full Access
Question # 5

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

A.

The code will output the following:

Bumblebee

B.

The code will output the following:

HumhlHee

C.

The code will output the following:

BumblHee

D.

The code will output the following:

HumblHee

Full Access
Question # 6

Which one of the following statements uses correct syntax and expressions?

A.

do (print "Hello $a") until ($a = 10);

B.

do {$a++} until {$a == $b}\;

C.

do {$in = $in++} while ($in < 100);

D.

do ($a++) until ($b = $a);

Full Access
Question # 7

Consider the following code block:

BEGIN {print ("Jan ");}

BEGIN {print ("Feb ");}

END {print ("Mar ");}

END {print ("Apr ");}

Print ("May ");

What is the result of this code block?

A.

Jan Feb May Apr Mar

B.

Jan Feb Mar Apr May

C.

Mar Apr May Jan Feb

D.

May Jan Feb Mar Apr

Full Access
Question # 8

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

Full Access
Question # 9

Which of the following accurately describes the roles of the Database Interface Module (DBI) and the Database Driver Module (DBD)?

A.

DBI transmits instructions to a database; DBD directs method calls to DBI.

B.

DBD transmits instructions to a database; DBI directs method calls to DBD.

C.

DBI makes available database-specific code; DBD transmits method calls to DBI.

D.

DBD makes available database-specific code; DBI translates method calls to DBD.

Full Access
Question # 10

Consider the following code:

%hashA = ("alpha", "beta", "gamma", "alpha");

%hashA = reverse(%hashA);

print $hashA{"alpha"};

What is the result of executing this code?

A.

The code outputs the following:

alpha

B.

The code outputs the following:

beta

C.

The code outputs the following:

gamma

D.

The code fails at line 3.

Full Access
Question # 11

Consider the following program code:

%color = (sun => yellow, apple => red);

reverse(%color);

@colorKeys = sort(keys(%color));

foreach(@colorKeys)

{

print($color{$_} . );

}

What is the result of executing this program code?

A.

The code will output the following:

apple sun

B.

The code will output the following:

sun apple

C.

The code will output the following:

red yellow

D.

The code will output the following:

apple red sun yellow

Full Access
Question # 12

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

A.

The code will output the following:

20 100 Apple Grapefruit Orange

B.

The code will output the following:

Apple Grapefruit Orange 20 100

C.

The code will output the following:

100 20 Apple Grapefruit Orange

D.

The code will output the following:

Orange Grapefruit Apple 100 20

Full Access
Question # 13

Consider the following program code:

@array = ("ALPHA", "beta", "GaMmA");

sort(@array);

print("@array");

What is the output of this code?

A.

beta GaMmA ALPHA

B.

ALPHA GaMmA beta

C.

ALPHA beta GaMmA

D.

beta ALPHA GaMmA

Full Access
Question # 14

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.

arg1

B.

runme.pl

C.

arg1 arg2 arg3

D.

2

Full Access
Question # 15

The filehandle INPUT is associated with the file represented by $file. Which statement will close the filehandle INPUT?

A.

close (INPUT, $file);

B.

closeINPUT;

C.

INPUT(close, $file);

D.

close(INPUT);

Full Access
Question # 16

Consider the following program code:

$Animal = Dogs bark;

package Cat;

$Animal = Cats purr;

{

package Fish;

$Animal = Fish swim;

}

package main;

print $Animal;

What is the result of executing this program code?

A.

The code will fail at line 4.

B.

The code will output the following:

Dogs bark

C.

The code will output the following:

Cats purr

D.

The code will output the following:

Fish swim

Full Access
Question # 17

Which of the following correctly creates a SQL statement that will insert the values of the $name and $age variables into a database? The statement is assigned to the $sqlStmt variable. Assume a CHAR data type for $name and an INT data type for $age.

A.

$sqlStmt = q{INSERT INTO aTable (NAME, AGE) VALUES ($name, $age)};

B.

$sqlStmt = q{INSERT INTO aTable (NAME, AGE) VALUES ($name\, $age)};

C.

$sqlStmt = qq{INSERT INTO aTable (NAME, AGE) VALUES ($name, $age)};

D.

$sqlStmt = qq{INSERT INTO aTable (NAME, AGE) VALUES (\$name\, $age)};

Full Access
Question # 18

Which of the following choices demonstrates the correct syntax to pass a reference to a subroutine?

A.

\@array4;

B.

@array4($ref);

C.

getpass(\@array4);

D.

getpass{@array4};

Full Access
Question # 19

Consider the following program code:

$x = 0;

$y = 5;

do

{

print ($x $y );

}

while (++$x < 5 && ++$y < 10);

print ($x $y );

What is the result of executing this program code?

A.

The code will output the following:

1 6 2 7 3 8 4 8 5 10 6 11

B.

The code will output the following:

0 5 1 6 2 7 3 8 4 9 4 9

C.

The code will output the following:

0 5 1 6 2 7 3 8 4 9 5 10

D.

The code will output the following:

0 5 1 6 2 7 3 8 4 9 5 9

Full Access
Question # 20

Yngve wants to define a character class that includes any alphanumeric word characters. Which one of the following choices is best suited for this requirement?

A.

/[a-zA-Z_0-9]/;

B.

/^w/;

C.

/[^a-zA-Z_0-9]/;

D.

/[^0-Z$]/;

Full Access
Question # 21

Consider the following lines of code:

@array1 = ("apples", "oranges", "pears", "plums");

foreach (@array1) {print "$_\n"};

What is the result of these lines of code?

A.

applesorangespearsplums

B.

apples oranges pears plums

C.

apples

D.

apples

oranges

pears

plums

Full Access
Question # 22

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

Full Access