in reply to Re^2: Weighted averages
in thread Weighted averages

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!

Replies are listed 'Best First'.
Re^4: Weighted averages
by drose2211 (Sexton) on Jan 25, 2018 at 17:54 UTC

    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!