Perl Quiz (Set 9) Perl (Set 9) 1 / 10 In Perl, what does the 'last' statement do within a loop? Terminates the entire program Exits the current iteration of the loop Exits the loop immediately Exits the loop immediately 2 / 10 What does the Perl 'ne' operator do? Compares if two strings are not equal Compares if two strings are equal Assigns a value to a variable Performs a bitwise XOR operation 3 / 10 Which operator is used for the logical OR in Perl? && || ! & 4 / 10 In Perl, what does the 'pop' function do? Removes the first element of an array Appends an element to the end of an array Deletes all elements from an array Removes the last element of an array 5 / 10 What is the purpose of the 'keys' function in Perl? Extracts the values from a hash Finds the average of numeric values Returns a list of keys from a hash Searches for a key in a hash 6 / 10 In Perl, how do you declare an array? $array = [1, 2, 3]; @array = (1, 2, 3); %array = (1, 2, 3); &array = (1, 2, 3); 7 / 10 What is the purpose of the 'until' loop in Perl? To execute a loop To define a custom function To iterate over a range of numbers To perform conditional execution until a condition is true 8 / 10 In Perl, how do you declare a scalar variable? $variable = value; @variable = value; %variable = value; &variable = value; 9 / 10 What is the Perl 'cmp' operator used for? Compares if two strings are equal Compares if two strings are not equal Compares two strings for equality, returning -1, 0, or 1 10 / 10 In Perl, what does the 'do...while' loop do? Performs conditional execution while a condition is true Performs unconditional execution at least once Performs iteration over a range of numbers Performs conditional execution until a condition is true Your score isThe average score is 0% 0% Restart quiz