http://qs321.pair.com?node_id=255028

Two years ago I wrote a short Perl test for perspective employees of the company I work for...
1. What does following statement do? print (2 * 3) + 3; 2. Why is the ‘use strict;’ statement useful? 3. Write a regular expression that removes trailing white space fro +m a string 4. What is the difference between a lexical variable and a package +variable? 5. What does the following statement do? $var = $#array; 6. What does the ‘<=>’ operator do? 7. Given the following data structure. How would you access the value ‘c’ in the scalar $a? $a = [ ‘a’, ‘b’, [ ‘c’, ‘d’ ], ‘e’ ];
The test is part of a larger exam that also covers 'C', Unix, Java and SQL. Candidates are asked to rate their knowledge of the technoglogies from none, fair, good or expert. Therefore, I want the Perl section just to give me an indication that they are telling the truth. If we wanted a Perl specialist I'd do a technical interview with them later. The problem is I don't think the test I wrote does this. While some questions seem reasonable to me, I get complaints about others. OK Question 1 is a bit of a trick question - I think I originally saw it suggested on a Perl site and thought it fair enough. But I've seen fairly decent Perl people getting 3,4,5,6 and 7 wrong.

Does any one have any better suggestions?

Needless to say that I consider most people who read this site as more than acceptable for our needs!

edited: Fri May 2 16:19:40 2003 by jeffa - title change (was: A Perl test)