Based upon the highly-problematic code you have posted here and other nodes you have written to date, I think you are trying run before you can walk. I would suggest getting a book to help you get on your feet - perhaps reading the free Beginning Perl or getting the more current 6th edition of Learning Perl.

Break your process into its component steps:

  1. Import data from 3 files. While you are opening the input files (but you should probably read perlopentut), you never read the files. See I/O Operators in perlop.
  2. Average the data. You are not doing this. Perhaps sum from List::Util would be useful for you here.
  3. Output the result. Again, you open an output file, but never print a result.

In reply to Re: averages from multiple files by kennethk
in thread averages from multiple files by Taylorswift13

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.