"unpack" is not even mentioned in my "Learn Perl in 24 hours"

Wow, not mentioned at all? Sheesh, I knew the 24-hours series wasn't great, but wow. Granted, unpack is not one of the most commonly-used functions, and I wouldn't expect a whole chapter on it or anything, but there should be at least a short discription of it. It is, after all, a builtin.

With that said, I'd have used substr rather than unpack for this, personally. *Surely* the book at least has a discussion of substr.

Until you get around to buying a new book, you can get by with perldoc It's not quite the same as having a book in your hands, but it's useful for reference.

If you're looking for a good Perl book, there are some quite excellent ones available. Generally you will not go far wrong with O'Reilly books, for instance. The one with the camel on the cover is great if you have a background in programming in other languages and just need to learn the things that are unique to Perl. If you have little prior programming experience, you might be better off with the llama book. I also quite liked <cite>Effective Perl Programming</cite>, but that one assumes you already know a bit of Perl, so it might not be a good starting point. There are, of course, other good choices as well.


In reply to Re: Regex selection based upon position by jonadab
in thread Regex selection based upon position by JeanLaspost

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.