in reply to Re: Weighted averages
in thread Weighted averages

I will take a look at the link, but here is a line from the file. All other lines are identical in format.

Allen Bailey,90,95,80,98,76,89

Replies are listed 'Best First'.
Re^3: Weighted averages
by thanos1983 (Parson) on Jan 25, 2018 at 17:04 UTC

    Hello again drose2211,

    I have updated my answer with sample of code and possible solution to your question.

    Hope this helps, BR.

    Seeking for Perl wisdom...on the process of learning...not there...yet!

      Thanks for the help. I will need to mess around with the hashes of hashes for a bit before I completely understand it.

        Hello again drose2211,

        The reason that I proposed to use the HASHES OF HASHES is because you can really easy get the data no matter how large is your hash really really fast by using the right keywords.

        For example, based on the code that I provided you above. Let's assume that you want to view the data of Student2:

        print Dumper $HoH{'Student2'}; __END__ $ perl test.pl in.txt $VAR1 = { 'final' => '0.033', 'quiz' => '0.001', 'exam' => '0.007' };

        Or if you want to know only the final output for example:

        print $HoH{'Student2'}{'final'} . "\n"; __END__ $ perl test.pl in.txt 0.033

        Hope this helps, BR.

        Seeking for Perl wisdom...on the process of learning...not there...yet!