One has to marvel at the lack of proofreading behind:
What is the simplest type of data that Perl can work with? 1. element 2. scalar 3. vector 4. component and then (in the answer section): The simplest type of data that Perl can work with is called a scalar. +Answer: C.
There wasn't any answer "C" ...?! Oh, we're supposed to do a mental translation from numbers to letters!
There's also a typo, in question #9:
Which of the following commands should be used to open a filehandle na +med KAREN to an existing file named sw? 1. open KAREN ">sw"; 2. open KAREN, ">sw"; 3. open "sw" KAREN; 4. open ">sw", KAREN;
I didn't like any of them ... the only one that works (#2) overwrites the file "sw", whereas the question implies that the file is being opened for read access.
As does the answer (which doesn't match):
The command open KAREN, "sw"; should be used to open a filehandle name +d KAREN to an existing file named sw. Answer: B.
I've only read the first 16 of them, but it's not a test I'd be likely to use in an interview session.
Oh, and one final nit: I always think of arrays as going horizontally from left to right, but if they are vertical, then wouldn't:
Which operator can be used to take the bottom item from an array? 1. pop 2. push 3. pull 4. plant
Have it upside-down? If anything, push and pop should work with the top of the array, I'd think...
In reply to Re: Snarky comments on the ddj perl quiz
by liverpole
in thread Snarky comments on the ddj perl quiz
by ysth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |