Winter Special Sale - Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 575363r9

Welcome To DumpsPedia

1D0-437 Sample Questions Answers

Questions 4

Consider the following program code:

%employees = ("Lucy", "Accounting", "Armando", "Finance",

"Adrienne", "Marketing");

delete($employees{"Lucy"});

Which of the following lines of code has the same effect as the preceding code?

Options:

A.

%employees = ("Adrienne", "Marketing");

B.

%employees = ("Lucy", "Accounting");

C.

%employees = ("Lucy", "Accounting", "Armando", "Finance");

D.

%employees = ("Armando", "Finance", "Adrienne", "Marketing");

Buy Now
Questions 5

Consider the following code:

%chars = ("a", "100", "b", "90", "c", "80");

Which one of the following choices will reverse the key/value pairing of the code?

Options:

A.

reverse(%chars);

B.

%chars = reverse(%chars);

C.

reverse(%chars) = %chars;

D.

invert(%chars);

Buy Now
Questions 6

Consider the following program code:

@stack = (10, 10..25);

push(@stack, yellow);

shift(@stack);

push(@stack, white);

print shift(@stack);

What is the result of executing this program code?

Options:

A.

The code will fail at line 3 because shift requires two arguments.

B.

The code will output the following:

11

C.

The code will output the following:

10

D.

The code will output the following:

white

Buy Now
Questions 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?

Options:

A.

Jan Feb May Apr Mar

B.

Jan Feb Mar Apr May

C.

Mar Apr May Jan Feb

D.

May Jan Feb Mar Apr

Buy Now
Questions 8

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

Options:

A.

s/Perl/perl/I;

B.

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

C.

s/"perl"/"Perl"/;

D.

s/perl/Perl/g;

Buy Now
Questions 9

Regular expressions are best used for which task?

Options:

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

Buy Now
Questions 10

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

Options:

A.

package::Library1;

B.

Library1::package;

C.

package(Library1);

D.

package Library1;

Buy Now
Questions 11

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

Options:

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

Buy Now
Questions 12

Consider the following program code:

if ("cool" =~ m/[cool]{4}/)

{

print("True ");

}

else

{

print("False ");

}

if ("cool" =~ m/[col]{4}/)

{

print("True ");

}

else

{

print("False ");

}

What is the output of this code?

Options:

A.

False False

B.

False True

C.

True False

D.

True True

Buy Now
Questions 13

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

Options:

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

Buy Now
Questions 14

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?

Options:

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

Buy Now
Questions 15

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

Options:

A.

\@array4;

B.

@array4($ref);

C.

getpass(\@array4);

D.

getpass{@array4};

Buy Now
Questions 16

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

Options:

A.

t text

20

B.

t tex

19

C.

t text

19

D.

t tex

20

Buy Now
Questions 17

Consider the following program code:

print(1 );

BEGIN { print(2 ); }

END { print(3 ); }

BEGIN { print(4 ); }

END

{

package MyPackage;

print(5 );

}

What is the result of executing this program code?

Options:

A.

The code will output the following:

1 2 3 4 5

B.

The code will output the following:

2 4 1 5 3

C.

The code will output the following:

2 1 3 4 5

D.

The code will output the following:

2 4 1 3

Buy Now
Questions 18

Consider the following program code:

@array = (10, Masami, 10..13, Niklas);

for ($i = 1; $i < $#array; $i++)

{

print($array[$i] );

}

What is the result of executing this program code?

Options:

A.

The code will output the following:

Masami 10 11 12 13

B.

The code will output the following:

10 Masami 10 11 12 13

C.

The code will output the following:

10 Masami 11 12 13 Niklas

D.

The code will output the following:

Masami 10 11 12 13 Niklas

Buy Now
Questions 19

Consider the following code:

$_ = "New York";

@array2 = split(//);

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

Options:

A.

""

B.

"N e w"

C.

"NewYork"

D.

"N"

Buy Now
Questions 20

Which statement will open the /etc/passwd file for reading only?

Options:

A.

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

B.

open(PASSFILE, "/etc/passwd");

C.

open(PASSFILE "+

D.

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

Buy Now
Questions 21

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

Options:

A.

while {0} (print "OK");

B.

while ($c != 99) {print "OK"}

C.

while {$b eq "OK"} (print "$a++");

D.

while ($_) Do {print "OK");

Buy Now
Questions 22

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

Options:

A.

@cities = Akron, Memphis, Ogden, Phoenix;

B.

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

C.

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

D.

@cities = ("Akron");

Buy Now
Questions 23

Which statement is the most accurate?

Options:

A.

The push function adds elements to the beginning of an array.

B.

The push function removes the first element in an array.

C.

The pop function removes the first element in an array.

D.

The pop function removes the last element in an array.

Buy Now
Questions 24

Consider the following command:

perl runme.pl arg1 arg2 arg3

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

Options:

A.

0

B.

1

C.

2

D.

3

Buy Now
Questions 25

Consider the following program code:

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

sort(@array);

print("@array");

What is the output of this code?

Options:

A.

beta GaMmA ALPHA

B.

ALPHA GaMmA beta

C.

ALPHA beta GaMmA

D.

beta ALPHA GaMmA

Buy Now
Questions 26

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?

Options:

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

Buy Now
Questions 27

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?

Options:

A.

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

B.

/^w/;

C.

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

D.

/[^0-Z$]/;

Buy Now
Questions 28

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

Options:

A.

Invoke the Perl debugger

B.

Send standard error to a file

C.

Disable breakpoints

D.

Display a stack trace

Buy Now
Questions 29

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

Options:

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

Buy Now
Questions 30

Consider the following assignments:

$x = 9

$y = 7

$z = 5

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

Options:

A.

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

B.

($z * 2) <= $x;

C.

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

D.

($x 2) > $y;

Buy Now
Questions 31

Consider the following program code:

$y = 1;

$x = 2;

$z = 3;

do

{

print ($y );

} while ($y eq 2);

do

{

print ($x );

} until ($x eq 2);

print ($z );

What is the result of executing this program code?

Options:

A.

The code will output the following:

1 2 3

B.

The code will output the following:

3

C.

The code will output the following:

2 3

D.

The code will output the following:

3 2 1

Buy Now
Questions 32

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

Options:

A.

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

B.

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

C.

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

D.

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

Buy Now
Questions 33

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

Options:

A.

while {0} (print "OK");

B.

while ($c != 99) {print "OK"}

C.

while {$b eq "OK"} (print "$a++");

D.

while ($_) Do {print "OK");

Buy Now
Questions 34

Consider the following statement:

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

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

Options:

A.

13

B.

4

C.

12

D.

16

Buy Now
Questions 35

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

Options:

A.

t text

20

B.

t tex

19

C.

t text

19

D.

t tex

20

Buy Now
Questions 36

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

Options:

A.

s/Perl/perl/I;

B.

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

C.

s/"perl"/"Perl"/;

D.

s/perl/Perl/g;

Buy Now
Questions 37

Consider the following program code:

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

sort(@array);

print("@array");

What is the output of this code?

Options:

A.

beta GaMmA ALPHA

B.

ALPHA GaMmA beta

C.

ALPHA beta GaMmA

D.

beta ALPHA GaMmA

Buy Now
Questions 38

Consider the following lines of code:

1.$playerStr = "Today's player is Bob Petit.";

2.if($playerStr =~ /[Ruth|Gehrig|DiMaggio]/) {

3. $game = "Baseball";

4.}else{

5. $game = "Basketball";

6.}

7.print $game;

What is the output of these lines of code?

Options:

A.

No output is generated due to an error in line 2.

B.

Basketball

C.

Baseball

D.

No output is generated due to an error in line 3.

Buy Now
Questions 39

Which of the following code segments correctly readies a database query, creating a valid statement handle and a result set? Assume $dbh represents a valid database handle.

Options:

A.

$sth = $dbh->prep_statement(SELECT * FROM aTable);

$sth->execute_statement;

B.

$sth = $dbh->prepare(SELECT * FROM aTable);

$sth->execute;

C.

$sth = $dbh->prep_statement(SELECT * FROM aTable);

$sth->execute;

D.

$sth = $dbh->prepare_statement(SELECT * FROM aTable);

$sth->execute_statement;

Buy Now
Questions 40

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?

Options:

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

Buy Now
Questions 41

Consider the following program code:

if ("Apple" gt "Pear")

{

print("True ");

}

else

{

print("False ");

}

if ("Banana" le "Banana")

{

print("True ");

}

else

{

print("False ");

}

What is the result of executing this program code?

Options:

A.

False False

B.

False True

C.

True False

D.

True True

Buy Now
Questions 42

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

Options:

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

Buy Now
Questions 43

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?

Options:

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

Buy Now
Questions 44

The values function performs which task?

Options:

A.

Generates a list of hash keys

B.

Generates a list of hash values

C.

Returns the number of key/value pairs

D.

Reads the hash values into an array

Buy Now
Exam Code: 1D0-437
Exam Name: CIW PERL FUNDAMENTALS
Last Update: Nov 20, 2024
Questions: 149
$64  $159.99
$48  $119.99
$40  $99.99
buy now 1D0-437