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

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

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

    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!