I recommend three things:

  1. Fix your compilation errors
  2. Fix your runtime errors
  3. Fix your logic errors

I could give more specific help if you would give a more specific problem statement than "I do not seem to accomplish that."

When I try to run your code under Perl 5.32.1 I get

Experimental push on scalar is now forbidden at fubar.new line 32, nea +r "$avgX )" Experimental push on scalar is now forbidden at fubar.new line 33, nea +r "$avgY )" Experimental push on scalar is now forbidden at fubar.new line 34, nea +r "$avgZ )" Experimental push on scalar is now forbidden at fubar.new line 35, nea +r "$difF )" Execution of fubar.new aborted due to compilation errors.
Is this what you are seeing? A different version of Perl might actually compile this, in which case it is on to the next problem.


In reply to Re: combining two csv files by using math operations by Anonymous Monk
in thread combining two csv files by using math operations by ng0177

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.