CIW 1D0-437 Exam
CIW Perl Fundamentals exam (Page 9 )

Updated On: 1-Feb-2026

Consider the following program code:
$y=l; $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?

  1. The code will output the following: 1 23
  2. The code will output the following 3
  3. The code will output the following 23
  4. The code will output the following 32 1

Answer(s): A



Consider the following program code:
%hash = (small => 8oz,
medium => 16oz, large => 32oz);
@keys = sort(keys(%hash));
for ($i = 0; $i < 3; $i++) {
print($hash{$keys[$i]}\n);
}
What is the result of executing this program code?

  1. The code will fail at line 1 because a hash cannot contain both numeric and string data
  2. The code will execute without error but will output nothing.
  3. The code will output the following: 32oz 16oz 8oz
  4. The code will output the following large medium small

Answer(s): C



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?

  1. Jan Feb May Apr Mar
  2. Jan Feb Mar Apr May
  3. Mar Apr May Jan Feb
  4. May Jan Feb Mar Apr

Answer(s): A

Explanation:

______________________________________________________________________________



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?

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

Answer(s): A



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

  1. @cities =Akron, Memphis, Ogden, Phoenix;
  2. @cities =~ ("Akron, Memphis");
  3. @cities =~ (Akron, Memphis, Ogden, Phoenix);
  4. @cities = ("Akron");

Answer(s): D



Viewing page 9 of 21
Viewing questions 41 - 45 out of 99 questions



Post your Comments and Discuss CIW 1D0-437 exam prep with other Community members:

Join the 1D0-437 Discussion