... words logic ... input file looks like this: 0000000NNNN00NNN0NNN0N0N0NN0N

But but but open (INTERVAL ... open(MASK so what is input?!

Sorry, I'm lazy

Also I do
understand 1) If one has an array
??understand?? 2) can you assign its length
??understand?? 3) at any given index position
understand 4) to a scalar variable

2-3 don't make sense. Array has one length (its size), it doesn't change based on index position; So yes, I'm sure it is possible but i'm not sure what it is.

I know I'm not thinking clearly at the moment, but I also know you're not thinking (communicating) clearly at the moment. You could clarify yourself by asking like this
my @interval = ( 1,2,3,4); ## WHATEVER, 2-5 lines of representative data
my @positions = (qw/ a b q q/); ## ... 2-5 ...
my @info = ( 6,7 ) ; ## ... 2-5 ... representative
and then explain what you want that you're not getting (in terms of @interval/@positions/@info real representative values). If @positions is wrong, or @info is wrong, or its the next part thats wrong .... show some real representative numbers , like boundary conditions (min/max allowed values), so that logic can be inferred/guessed


In reply to Re: A question About Array Indexing by Anonymous Monk
in thread A question About Array Indexing by ccelt09

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.