I'm with you!

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...


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

In reply to Re: Snarky comments on the ddj perl quiz by liverpole
in thread Snarky comments on the ddj perl quiz by ysth

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.