I'm also wondering whether the length function works on a hash such as $seq{$id} in the same way it works on say something like $id?

$seq{$id} is not a hash, but a value, and it's length can be determined, as with any string or number or byte sequence. In Perl speak, the word hash denotes the whole structure of an associative array holding key/value pairs. A hash is minced meat, and that's what's done to the key of a tuple: it is transformed via a hashing function into something that can be used as index into an associative array. So, a perl "hash" is an "unordered collection of scalar values indexed by their associated string key (perldata) which for lookup purposes is minced through a hashing function". For entries (key/value pairs) in such a collection (hash entry) the string key is often referred to as hash key and the value as hash value.

This may sound pedantic and as nitpicking (sorry about that), but people understand each other better if they agree on the meaning of terms.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

In reply to Re^3: Picking out specific lengths from a set of hashes. by shmem
in thread Picking out specific lengths from a set of hashes. by Peter Keystrokes

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.