Keep It Simple, Stupid | |
PerlMonks |
Re: database using associative hasby JavaFan (Canon) |
on Jul 26, 2010 at 10:53 UTC ( [id://851353]=note: print w/replies, xml ) | Need Help?? |
You store all the data in %studentbase, then use the temporary variable @subinfo (which gets repopulated for each line) to determine which line to print.
I'd say you're entire design is wrong. There's no need to store the entire database in memory. Just read a line, determine which subjects the student fails, and print a line stating the name and the subjects. Then move to the next student.
In Section
Seekers of Perl Wisdom
|
|