That is a description of how you think you need to write some code to perform some (as yet poorly specified) task. What I want to know is: what is the task you want to perform?

Most recently it looks like maybe you want to create a file containing a section for each line of an input file where each section contains the line from the input file and the entire contents of a second file. That is completely different than the first question you asked. On top of that the second task seems such an odd thing to want to do (except maybe as an exercise) that I doubt that is what you really want.

I didn't look (just) at the code to try and figure out what you wanted to do. I looked at the descriptions you gave of two apparently completely different problems. In the first node you say things like "add up the Bytes Field". In the second node you show a block of output that has nothing to do with totalled byte fields. Summing byte fields makes a great deal of sense to me. Creating a file with huge amounts of duplicated data in it makes no sense at all.

True laziness is hard work

In reply to Re^4: Generating a List of numbers by GrandFather
in thread Generating a List of numbers by mlebel

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.