๐Ÿงช Perl MCQ Quiz Hub

Perl Mcq Question Set 1

Choose a topic to test your knowledge and improve your Perl skills

1. Which function is used by perl for reversing a string?




2. Scalar stores




3. When you're pattern matching, you describe the pattern using




4. When the "require" function loads?




5. Which of the following statement repeats a statement or group of statements until a given condition becomes true. It tests the condition before executing the loop body?




6. Select comparison operator from the options.




7. What will be printed by the code below? my $val = {}; print ref($val);




8. It is often more convenient to save perl program files with ____ extension




9. Which of the following is used in perl?




10. Language which features rich text processing capabilities and flexibility is




11. When a string is used for numeral computations, perl converts it into




12. Scalar is denoted by_______in Perl.




13. In Perl, the words function and subroutines are used interchangeably.




14. How do you perform a forward declaration of a subroutine performed?




15. What will display the list of warning messages regarding the code?




16. Which of these is NOT available for Perl




17. The "+=ย is which type of operator?




18. The getdir command




19. Select the option which allows the user to scroll through the entire program line by line in Perl.




20. What will be the value in the variable $a after these two statements: $a = "Happy"; $a = "Sunday";?




21. Which function is used by perl for displaying the length of a string?




22. When you create a variable, you may assume it starts off containing




23. Command line arguments in Perl are stored in




24. Which one of the following is the most powerful filter?




25. A perl program runs in a special interpretive mode.




26. To test whether perl is in your PATH, use ____




27. It is often more convenient to save perl program files with ____ extension.




28. ___ function is used for removing the last character from the line.




29. perl variables have no type and no initialization.




30. When a string is used for numeral computations, perl converts it into ___




31. If a variable is undefined, its value is ____




32. Which of the following are concatenation operators?




33. To repeat a string, perl uses ___ operator.




34. ___ function returns the first occurrence of a character in a string.




35. For extracting a substring, ____ function is used.




36. substr function is also used to alter an existing string.




37. Which function is used for handling substitutions in perl?




38. Which escape character is used for identifying a word character?




39. We can use find command for testing files with perl.




40. We can specify filenames in command line using perl.




41. Which of the following is referred to as default variable?




42. ___ operator is used for selecting current line number.




43. ___ is known as range operator.




44. The command @x=(1. .10) will assign first ten integer values to the array โ€˜aโ€™.




45. The ___ prefix to an array name signifies the last index of the array.




46. For deleting the elements from the left of the array ___ function is used.




47. For deleting the elements from the right of the array ___ function is used.




48. To add elements to the left side of the array ____ function is used.




49. To add elements to the right side of the array ____ function is used.




50. Which function can combine the functionalities of push, pop, unshift and shift?