Labour Day Special - 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: c4sdisc65

1D0-437 PDF

$38.5

$109.99

3 Months Free Update

  • Printable Format
  • Value of Money
  • 100% Pass Assurance
  • Verified Answers
  • Researched by Industry Experts
  • Based on Real Exams Scenarios
  • 100% Real Questions

1D0-437 PDF + Testing Engine

$61.6

$175.99

3 Months Free Update

  • Exam Name: CIW PERL FUNDAMENTALS
  • Last Update: May 18, 2024
  • Questions and Answers: 149
  • Free Real Questions Demo
  • Recommended by Industry Experts
  • Best Economical Package
  • Immediate Access

1D0-437 Engine

$46.2

$131.99

3 Months Free Update

  • Best Testing Engine
  • One Click installation
  • Recommended by Teachers
  • Easy to use
  • 3 Modes of Learning
  • State of Art Technology
  • 100% Real Questions included

1D0-437 Practice Exam Questions with Answers CIW PERL FUNDAMENTALS Certification

Question # 6

Which of the following choices demonstrates the correct syntax for creating a hash?

A.

%passwds = ("denise", "robert", "yolanda") => ("pass1", "pass2", "pass3");

B.

%passwds() = ("denise", "pass1", "robert", "pass2", "yolanda", "pass3");

C.

%passwds = (denise=> "pass1", robert=> "pass2", yolanda=> "pass3");

D.

%passwds{3} = ("denise", "robert", "yolanda") => ("pass1", "pass2", "pass3");

Full Access
Question # 7

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?

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

Full Access
Question # 8

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

Full Access
Question # 9

Consider the following program code:

$val = 5;

if ($val++ == 6)

{

print("True ");

}

else

{

print("False ");

}

if ($val++ == 6)

{

print("True ");

}

else

{

print("False ");

}

What is the output of this code?

A.

False False

B.

False True

C.

True False

D.

True True

Full Access
Question # 10

Consider the following program code:

package Dog;

$string = Walk the dog.;

if($string eq Walk the dog.)

{

package Cat;

$string = Pet the cat.;

print($string\n);

}

print ($string\n);

What is the result of executing this program code?

A.

The code will output the following:

Pet the cat.

B.

The code will output the following:

Walk the dog.

C.

The code will output the following:

Pet the cat.

Walk the dog.

D.

The code will output the following:

Walk the dog.

Pet the cat.

Full Access
Question # 11

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

A.

package::Library1;

B.

Library1::package;

C.

package(Library1);

D.

package Library1;

Full Access
Question # 12

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

A.

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

B.

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

C.

open(PASSFILE "+

D.

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

Full Access
Question # 13

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 # 14

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?

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

Full Access
Question # 15

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 # 16

Which of the following methods of calling a subroutine is not valid?

A.

$namex = getname();

B.

getname() = @array1;

C.

$yearstogo = $Retireage Currentage();

D.

$yearstogo = $Retireage Currentage($name);

Full Access
Question # 17

In Perl, packages are used for which task?

A.

To label a program

B.

To encrypt a program

C.

To create new keywords

D.

To define a namespace

Full Access
Question # 18

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

1D0-437 question answer
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 # 19

Which of the following choices demonstrates the correct syntax to pass the argument $arg2 to the subroutine getpass?

A.

getpass($arg2);

B.

call &getpass($arg2);

C.

sub &getpass($arg2);

D.

call getpass($arg2);

Full Access
Question # 20

Consider the following lines of code:

$_ = "This is a test";

s/^([^ ]*)\s*([^ ]*)/$2 $1/;

print;

What is the output of these lines of code?

A.

h Tis a test

B.

is This a test

C.

i Thiss a test

D.

his T is a test

Full Access
Question # 21

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 # 22

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;

Full Access
Question # 23

Which of the following describes the functionality of the DBI tables method?

A.

The tables method returns a list of all system tables in a database.

B.

The tables method returns a list of all user-defined tables in a database.

C.

The tables method returns a list of all tables in a database.

D.

The tables method returns a list of all related tables in a database.

Full Access
Question # 24

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 # 25

Consider the following program code:

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

@array = 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 # 26

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 # 27

Which of the following tasks is the least effective in reducing errors in Perl scripts?

A.

Writing pseudo-code before beginning the script

B.

Writing modular code

C.

Declaring and initializing variables

D.

Using the no strict <'refs' | 'vars' | 'subs'>; commands in the code

Full Access
Question # 28

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?

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.

Full Access
Question # 29

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

A.

while {0} (print "OK");

B.

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

C.

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

D.

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

Full Access
Question # 30

In the context of Perl user-defined subroutines, which statement is the most accurate?

A.

Variables declared using the my keyword are global in scope.

B.

Variables declared using the local keyword are only available to the subroutine from which they are declared.

C.

Variables declared using the my keyword are available to the calling subroutine.

D.

Variable declared using the local keyword are available to subsequently called subroutines.

Full Access
Question # 31

Which of the following choices demonstrates the correct syntax for creating a hash?

A.

%passwds = ("denise", "robert", "yolanda") => ("pass1", "pass2", "pass3");

B.

%passwds() = ("denise", "pass1", "robert", "pass2", "yolanda", "pass3");

C.

%passwds = (denise=> "pass1", robert=> "pass2", yolanda=> "pass3");

D.

%passwds{3} = ("denise", "robert", "yolanda") => ("pass1", "pass2", "pass3");

Full Access
Question # 32

Which statement will print the capital attribute of the $kansas object?

A.

print ("capital"=>$kansas);

B.

print {$kansas}=>(capital);

C.

print (capital)<={$kansas};

D.

print $kansas->{"capital"};

Full Access
Question # 33

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 # 34

Consider the following program code:

$x = 10;

LOOP: while ($x < 15)

{

print ($x );

if ($x >= 14 && $x <= 20)

{

$x += 2;

redo LOOP;

}

else

{

$x++;

}

}

What is the result of executing this program code?

A.

The code will output the following:

11 12 13 14 15 16 17 18 19

B.

The code will output the following:

10 11 12 13 14 16 18 20 22

C.

The code will output the following:

10 11 12 13 14 16 18 20

D.

The code will output the following:

10 11 12 13 14 15 16 17 18 19 20

Full Access
Question # 35

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?

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

Full Access
Question # 36

Consider the following lines of code:

sub mySub {

$_ = @_[1];

$a = shift;

$b = shift;

return $a * $b * $_;

}

mySub(1,2,3);

What is the output of these lines of code?

A.

No output results from this code.

B.

6

C.

2

D.

4

Full Access
Question # 37

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 # 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?

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.

Full Access
Question # 39

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

Full Access
Question # 40

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?

A.

False False

B.

False True

C.

True False

D.

True True

Full Access
Question # 41

Consider the following program code:

$i = 15;

LOOP: for(; $i < 25; $i++)

{

if ($i % 2)

{

next LOOP;

}

print($i );

}

What is the result of executing this program code?

A.

The code will output the following:

15 2 4 6 8 10 12 14 16 18 20 22 24

B.

The code will output the following:

15 17 19 21 23 25

C.

The code will fail at line 2 because $i is not initialized.

D.

The code will output the following:

16 18 20 22 24

Full Access
Question # 42

Consider the following lines of code:

sub mySub { (

$arg, @args) = @_;

foreach $val (@args) {

$returnVal .= "$arg, $val\n";

}

$returnVal . "" . @args;

}

print &mySub(1, "a value", "another value", "a parameter", "another parameter");

What is the output of these lines of code?

A.

1, a value 1, another value 1, a parameter 1, another parameter 4

B.

1, a value 1, another value 1, a parameter 1, another parameter

a valueanother valuea parameteranother parameter

C.

1, a value, another value, a parameter, another parameter

a value another value a parameter another parameter

D.

1, a value, another value, a parameter, another parameter 4

Full Access
Question # 43

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 # 44

Which keyword indicates an object reference rather than a variable reference?

A.

return

B.

bless

C.

package

D.

object

Full Access