Perl MCQ Test: Perl MCQs - Practice Questions
1. What is the purpose of the 'map' function in Perl?
2. What is the purpose of the 'last' statement in Perl?
3. Explain the concept of Perl's 'tie::IxHash' module.
4. Explain the concept of Perl's 'taint mode' and its significance.
5. Explain the purpose of the 'IPC::Run' module in Perl.
6. In Perl, what is autovivification?
7. In Perl, how do you round a floating-point number to the nearest integer?
8. What is the purpose of the 'my' keyword in Perl?
9. What does CGI stand for in Perl programming?
10. In Perl, how do you check if a file exists?
11. In Perl, what is the purpose of the 'qw()' function?
12. Which function is used to pause execution in Perl?
13. Which function is used to sort an array in Perl?
14. What is the purpose of the 'rand' function in Perl?
15. What is the purpose of the 'unlink' function in Perl?
16. In Perl, how do you open and read a file?
17. Which Perl function is used for reading input from the standard input?
18. What is the purpose of the 'autobox' module in Perl?
19. In Perl, how do you declare an array?
20. Which operator is used for string concatenation in Perl?
21. Explain the purpose of the 'tie' and 'tied' functions in Perl.
22. How do you comment a single line in Perl?
23. What is the purpose of the 'Class::Struct' module in Perl?
24. Which operator is used for conditional execution in Perl?
25. Which function is used for pattern matching in Perl?
26. What is the purpose of the 'use strict;' pragma in Perl?
27. What is the purpose of the 'sprintf' function in Perl?
28. What is the significance of the 'autodie' pragma in Perl?
29. What is the 'namespace::autoclean' module used for in Perl?
30. Explain the use of the 'pack' and 'unpack' functions in Perl.