Perl Interview Questions and Answers
-------------------------------------
What do variable sigils indicate in Perl 5?
What's the difference between accessing an array element with $items[$index] and @items[$index]?
What's the difference between == and eq?
What do you get if you evaluate a hash in list context?
How do you look up keywords in the Perl documentation?
What is the difference between a function and a method in Perl 5?
When does Perl 5 reclaim the memory used by a variable?
How do you ensure that the default scope of a variable is lexical?
How do you load and import symbols from a Perl 5 module?
What governs how Perl 5 loads modules How can you influence the list of directories from which perl attempts to load modules?
How do you look up error messages in the Perl 5 documentation? (Award bonus points for knowing how to enable explanations of all error messages encountered.)
What happens when you pass an array into a function?
How do you pass one or more distinct arrays into a function?
What is the difference, on the caller side, between return; and return undef;?
Where do tests go in a standard CPAN distribution?
How do you run tests in a standard CPAN distribution?
What command do you use to install new distributions from the CPAN?
Why would you use the three-argument form of the open builtin?
How do you detect (and report) errors from system calls such as open? (Award bonus points for knowing how to enable automatic detection and reporting of errors.)
How do you throw an exception in Perl 5?
How do you catch an exception in Perl 5?
What is the difference between reading a file with for and with while?
How do you handle parameters within a method or function in Perl 5?
What do parentheses around the variable name in my ($value) = @_; mean, and what would happen if you removed them?
Is new a builtin function/keyword?
How do you read the documentation of a core library? A CPAN module?
How do you access only the values of a Perl 5 hash?
That's all about some good Perl Interview Questions and Answers. If you are starting to learn Perl, this list is a good way to measure your skills. A good Perl developer should be able to answer all of these questions without much difficulty and with little bit of study and practice. You can also read a good text on Perl to learn more about these questions e.g. Modern Perl.
No comments:
Post a Comment
Feel free to comment, ask questions if you have any doubt.