I'm not sure how to answer this, because I find it difficult to imagine describing someone who got 3, 5, 6 or 7 wrong as a "fairly decent" perl programmer. 2 and 4 are more difficult, particularly since the candidate needs to guess how much they should say - I'm sure you could write for an hour on either one without exhausting the subject.
But they all seem reasonable questions; the only one I think is a bit unreasonable is #1, because it is code you wouldn't normally ever expect to write except in error. Perhaps more reasonable would be to say something like:
1. This code prints "5". Why is the "+" sign necessary?
print +(2 * 3) - 1;
Because of their open-ended nature, I'd also be inclined to put 2 and 4 last, and perhaps keep just one of them: they feel more like "extra credit" questions.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||