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!
|