1D0-437 Exam Questions
99 real 1D0-437 exam questions with expert-verified answers and explanations. Page 1 of 2.
- Question #1
Consider the following command: perl1 runme.pl arg1 arg2 arg3 Given this command issued on the command line, what is the value of $#ARGV?
- Question #2
Consider the following code: $_ = "New York"; @array2 = split(//); What is the value of $array2[0] after the code is executed?
- Question #3
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 resu...
- Question #4
Consider the following program code: %hash = ("small" -> "Boz", "medium" => "16oz", "large" => "32oz"); @keys = sort(keys(%hash)); for ($i = 0; $i < 3; $i++) { print("$hash{$keys[$...
- Question #5
Which of the following choices demonstrates the correct syntax to pass a reference to a subroutine?
- Question #6
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?
- Question #7
Consider the following statement: @array1 = (9, "A", 0..9, "PERL"); Given this statement, @array1 consists of how many elements?
- Question #8
Consider the following program code: %_Nifty = (one, two, three, four); @NiftyKeys = sort(keys(%_Nifty)); foreach(@NiftyKeys) { print ($_Nifty{$_} . ); } What is the result of exec...
- Question #9
Consider the following program code: @list - (10..15); foreach(@list) { print("$_ "); } What is the result of executing this program code?
- Question #10
In Perl, modules are used for which task?
- Question #11
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 re...
- Question #12
Which statement will print the capital attribute of the $kansas object?
- Question #13
Consider the program code in the attached exhibit. What is the result of executing this program code?
- Question #14
Which statement will open the /etc/passwd file for reading only?
- Question #15
Consider the following expression $modresult - 33 % 11; What is the value of $modresult in the expression?
- Question #16
Consider the following program code: @array - (1..5); print(shift(@array) . " "); print(shift(@array) . " "); print(pop(@array) . " "); print(pop(@array( . " "); push(@array, "SIX"...
- Question #17
Which one of the following statements uses correct syntax and expressions?
- Question #18
Which one of the following choices will replace all occurrences of the word perl with the word Perl?
- Question #19
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 ("$...
- Question #20
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...
- Question #21
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); } Wha...
- Question #22
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...
- Question #23
Assume $sth is a valid statement handle. Which of the following correctly outputs the data from the first three columns of a result set?
- Question #24
Consider that a file named test.txt contains this line of text: $file = "test.txt"; open (OUT, "<$file") || (die "cannot open $file: $!"); seek(OUT, 15,0); read(OUT,$buffer, 5); pr...
- Question #25
Which of the following choices demonstrates the proper way to close a database connection given that$dbh is the database handle?
- Question #26
Consider the following program code: @array = ("one", "two"); push(@array, "three"); shift(@array); unshift(@array, "four"); pop(@array); print($array[0]); What is the output of th...
- Question #27
Which of the following accurately describes the roles of the Database Interface Module (DBI) and the Database Driver Module (DBD)?
- Question #28
Consider the following lines of code: $_ = "This is a test"; s/^([^ ]*)\s*([^ ]*)/$2 $1/; print; What is the output of these lines of code?
- Question #29
Which statement is the most accurate?
- Question #30
Which of the following is a valid subroutine name?
- Question #31
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?
- Question #32
Which statement writes data to the filehandle OUTPUT?
- Question #33
Which one of the following choices lists valid assertions that represent places within a string?
- Question #34
Which one of the following statements opens a file for appending?
- Question #35
Which keyword indicates an object reference rather than a variable reference?
- Question #36
Which Perl debugger commands can be used to step through a script?
- Question #37
Consider the following lines of code: sub mySub {( $arg,@args) = @_; foreach $val (@args) { SreturnVal .= "$arg, $val\n"; } SreturnVal."". @args; } print SmySub(1 "a value", "anoth...
- Question #38
Consider the following code: @cities = qw( Pittsburgh Atlanta Nashville Boston ); $city = join (":", @cities); What is the value of $city after the code is executed?
- Question #39
Which one of the following choices lists only valid expression operators?
- Question #40
Consider the program code in the attached exhibit. What is the result of executing this program code?
- Question #41
Consider the following program code: @array = ("Y","W"1"X"); ''rray = sort(@ array); unshift(@array, "Z"); print(@array[0]); What is the output of this code?
- Question #42
The values function performs which task?
- Question #43
Which of the following choices demonstrates the correct syntax for creating a hash?
- Question #44
Which one of the following choices will assign the current package Library1?
- Question #45
Regular expressions are best used for which task?
- Question #46
Running your Perl scripts with a w switch will perform which task?
- Question #47
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 ")...
- Question #48
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?
- Question #49
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?
- Question #50
Which of the following choices demonstrates the correct syntax to pass the argument $arg2 to the subroutine getpass?