Perl Quiz (Set 4) Perl (Set 4) 1 / 10 What does the Perl 'join' function do? Splits a string into an array Removes whitespace from a string Joins multiple strings into one Replaces substrings in a string 2 / 10 In Perl, what does the 'next' statement do within a loop? Jumps to the end of the loop body Advances to the next iteration of the loop Exits the loop immediately Resets the loop counter 3 / 10 What does the Perl 'ne' operator do? Compares if two strings are not equal Assigns a value to a variable Checks if a string is empty Performs a bitwise XOR operation 4 / 10 Which operator is used for the logical AND in Perl? || ! & && 5 / 10 What is the purpose of the 'map' function in Perl? Applies a function to each element of an array Joins multiple arrays into one Converts an array into a string Sorts the elements of an array 6 / 10 In Perl, what does the 'push' function do? Appends an element to the end of an array Adds an element to the beginning of an array Removes the last element of an array Deletes all elements from an array 7 / 10 Which function is used to convert a string to lowercase in Perl? lowercase() lc() toLower() convertToLowerCase() 8 / 10 What is the purpose of the 'unless' statement in Perl? To execute a loop To exclude a module To perform conditional execution if a condition is false To define a subroutine 9 / 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); 10 / 10 What is the purpose of the 'foreach' loop in Perl? To iterate over a range of numbers To loop through an array or list To define a custom function To perform string concatenation Your score isThe average score is 0% 0% Restart quiz